Skip to content
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

Create Get: ListAssetByCreator #2

Open
1 of 3 tasks
Shubhaankar-Sharma opened this issue Jun 25, 2021 · 1 comment
Open
1 of 3 tasks

Create Get: ListAssetByCreator #2

Shubhaankar-Sharma opened this issue Jun 25, 2021 · 1 comment

Comments

@Shubhaankar-Sharma
Copy link
Member

Shubhaankar-Sharma commented Jun 25, 2021

Summary

Create New Endpoint Get: ListAssetByCreator
Checkpoints:

  • Add Pagination
  • Use Already Created Function store.ListAssetByCreator (maybe you would have to change the query ping me in the server if we do)
  • Requires User_id
@Shubhaankar-Sharma
Copy link
Member Author

Shubhaankar-Sharma commented Jun 26, 2021

var pageSize int32 = 5
var pageNumber int32 = 1
args := ListAssetByCreatorParams{
CreatorID: generatedAsset.CreatorID,
Limit:     5,
Offset:    (pageNumber - 1) * pageSize,
}
assetLists, err := testQueries.ListAssetByCreator(r.Context(), args)

this is how pagination is to be done

func TestQueries_ListAssetByCreator(t *testing.T) {

its been done in this test

@mohamed040406 mohamed040406 added the good first issue Good for newcomers label Sep 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants