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

API to count files associated with an APIKey #77

Open
rajat1saxena opened this issue Jan 19, 2024 · 0 comments
Open

API to count files associated with an APIKey #77

rajat1saxena opened this issue Jan 19, 2024 · 0 comments
Assignees

Comments

@rajat1saxena
Copy link
Member

In the api project, create an endpoint to get total number of files associated with an API key.

Tech design:

  1. In the apps/api/lib/media/routes.ts file, add the following route:
POST /get/count
  1. The above will call the handler getMediaCount which will be created in the file apps/api/lib/media/handlers.ts.

  2. The getMediaCount method will get the total count of the files associated with the apikey and return it.

Expected response:

{count: 500}
@rajat1saxena rajat1saxena changed the title Create an API to count total number of files in an API key. API to count files associated with an APIKey Jan 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants