hngprojects / hng_boilerplate_nestjs

Description
Apache License 2.0
181 stars 105 forks source link

[FIX]:(PHP) Refactoring API Endpoint For Getting The Dashboard #1096

Open Pwincess1 opened 2 months ago

Pwincess1 commented 2 months ago

Description

Endpoint for getting the dashboard

Route

GET/api/v1/Dashboards

Response Body

{
  "revenue": 0,
  "subscriptions": 0,
  "sales": 0,
  "activeSubscription": 0,
  "monthSales": [
    {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "user_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "product_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "subscription_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "type": "product",
      "status": "Pending",
      "partners": "Paystack",
      "amount": 0,
      "reference": "string",
      "created_at": "2024-08-24T16:28:19.305Z",
      "paid_at": "2024-08-24T16:28:19.305Z",
      "modified_at": "2024-08-24T16:28:19.305Z"
    }
  ]
}
amowogbaje commented 2 months ago

@amowogbaje