-
Notifications
You must be signed in to change notification settings - Fork 10
Implement GetMyDataCollectionItems use case #294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Hi @ekraffmiller, should we already create a js-dataverse use case for this endpoint? |
That's true there are bug fixes to wait for, I just wasn't sure if we needed to work with what we have since I'm not sure when they will be fixed. But I can put a waiting tag on this and work on other things until we decide what to do. |
Ok, so if you did any temporary patch/fix to avoid the bugs please mention it in the PR. If you believe that there are no big patches to do to make it work it's ok otherwise I would wait but prioritising the API bug fixes to be fixed as soon as possible. |
Ok, to summarize the issues on the API -
These errors don't affect the logic of the use case, just the testing. When 2 and 3 are fixed, we need to update the tests. Number 2 affects the SPA handling empty results. So I think we can set it to waiting until 2 is fixed, as you said, it shouldn't be a big change. |
|
@ekraffmiller ok, it doesn't sound too bad right? |
g-saracca
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job, looks great! 🎉 Just some minor comments.
It's awesome that MyData endpoint returns the same properties(different naming) as the Search endpoint so we can share Collection, Dataset and File Previews models between these two use cases!
One more thing, could you add integration tests regarding filtering in the GetMyDataCollectionItems use case as we have with the GetCollectionItems use case?
src/collections/infra/repositories/transformers/collectionTransformers.ts
Outdated
Show resolved
Hide resolved
|
Hi @g-saracca I finally fixed the tests! when I used createCollectionViaApi, the collection didn't appear in the results, but when I used the use case instead (createCollection.execute()) it works. I don't know why, since the collection seems to be created correctly in both instances. Also, when I create the new user, I have to give it superuser privileges in order to have the permission to create a subcollection within the test collection. |
g-saracca
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving!
|
Tests are passing - merging. |
What this PR does / why we need it:
Implements a use case for calling the MyData API endpoint, used in the SPA Accounts Page -> My Data section.
Returns a collection of CollectionItems, similar to the GetCollectionItems use case.
Which issue(s) this PR closes:
Suggestions on how to test this:
Review code and tests