codelitdev / medialit

Upload, process and optimise your media files on a AWS S3 compatible storage
https://medialit.cloud
GNU Affero General Public License v3.0
7 stars 3 forks source link

API to count files associated with an APIKey #77

Open rajat1saxena opened 8 months ago

rajat1saxena commented 8 months ago

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
  2. The above will call the handler getMediaCount which will be created in the file apps/api/lib/media/handlers.ts.

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

Expected response:

{count: 500}