diff --git a/src/index.js b/src/index.js
index 501e586..07ccff9 100644
--- a/src/index.js
+++ b/src/index.js
@@ -319,29 +319,109 @@ app.get('/docs', (req, res) => {
API Documentation
Dashboard
- GET /api/song
- Endpoint to log a song play. Requires query parameters:
-
- - song: The name of the song
- - artists: The name of the artists
- - album: The name of the album
- - userID: The ID of the user (optional)
-
- Response:
-
- - message (string): Confirmation message.
- - data (object): Details of the song added.
-
- GET /api/user-songs
- Endpoint to retrieve songs played by a specific user. Requires query parameters:
-
- - userID: The ID of the user
-
- Response:
-
- - message (string): Confirmation message.
- - data (array): List of the song played by the user.
-
+
+
GET /api/song
+
Endpoint to log a song play. Requires query parameters:
+
+ - song: The name of the song
+ - artists: The name of the artists
+ - album: The name of the album
+ - userID: The ID of the user (optional)
+
+
Response:
+
+ - message (string): Confirmation message.
+ - data (object): Details of the song added.
+
+
+
+
GET /api/user-songs
+
Endpoint to retrieve songs played by a specific user. Requires query parameters:
+
+ - userID: The ID of the user
+
+
Response:
+
+ - message (string): Confirmation message.
+ - data (array): List of the song played by the user.
+
+
+
+
GET /api/db/clear
+
Endpoint to clear db by the owner or admin. Requires query parameters:
+
+ - key: Set Key to clear the
+
+
Response:
+
+ - message (string): Confirmation message.
+
+
+ Referral Codes
+
+
GET /api/referral-codes
+
Endpoint to retrieve all referral codes.
+
Response:
+
+ - message (string): Confirmation message.
+ - data (array): List of referral codes.
+
+
+
+
+
GET /api/referral-codes/add
+
Endpoint to add a new referral code. Requires query parameters:
+
+ - code (string): The referral code to add.
+ - userID (string): The ID of the user adding the referral code.
+
+
Response:
+
+ - message (string): Confirmation message.
+ - data (object): Details of the added referral code.
+
+
+
+
+
GET /api/referral-codes/use
+
Endpoint to use a referral code. Requires query parameters:
+
+ - code (string): The referral code to use.
+ - email (string): The email of the user using the referral code.
+
+
Response:
+
+ - message (string): Confirmation message.
+ - data (object): Details of the used referral code.
+
+
+
+
+
GET /api/referral-codes/generate
+
Endpoint to generate new referral codes. Requires query parameters:
+
+ - userID (string): The ID of the user generating the referral codes.
+ - num (number): The number of referral codes to generate (maximum 5).
+
+
Response:
+
+ - message (string): Confirmation message.
+ - data (array): List of generated referral codes.
+
+
+
+
+
GET /api/referral-codes/get
+
Endpoint to retrieve referral codes by user ID. Requires query parameters:
+
+ - userID (string): The ID of the user whose referral codes are to be retrieved.
+
+
Response:
+
+ - message (string): Confirmation message.
+ - data (array): List of referral codes created by the user.
+
+