Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,18 @@ GITHUB_CLIENT_SECRET=githu-client-secret
CROSS_PLATFORM_OAUTH_REDIRECT_URL=telware://telware.online/social-auth-loading
FRONTEND_URL=localhost:5174

GROUP_SIZE= 5
GROUP_SIZE= 5

FIREBASE_SERVICE_ACCOUNT='{
"type": "service_account",
"project_id": "your-project-id",
"private_key_id": "your-private-key-id",
"private_key": "-----BEGIN PRIVATE KEY-----\\nYOUR_PRIVATE_KEY\\n-----END PRIVATE KEY-----\\n",
"client_email": "your-client-email@your-project.iam.gserviceaccount.com",
"client_id": "your-client-id",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/your-client-email%40your-project.iam.gserviceaccount.com"
"universe_domain": "googleapis.com"
}'
20 changes: 14 additions & 6 deletions docs/api/chat.swagger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,20 @@
* items:
* type: string
* description: IDs of users blocked by this member.
* unreadMessages:
* type: array
* items:
* type: object
* properties:
* chatId:
* type: string
* description: Unique identifier of the chat this message belongs to.
* unreadMessagesCount:
* type: string
* description: Number of unread messages in the chat.
* isMentioned:
* type: boolean
* description: Indicates if the user is mentioned in the chat.
* lastMessages:
* type: array
* items:
Expand Down Expand Up @@ -171,12 +185,6 @@
* type: string
* format: date-time
* description: Timestamp when the message was sent.
* __v:
* type: integer
* description: Version key.
* id:
* type: string
* description: Alias for `_id`.
* 401:
* description: User is not logged in or the request is invalid.
* content:
Expand Down
3 changes: 3 additions & 0 deletions docs/api/sockets.swagger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@
* isForward:
* type: boolean
* description: Indicates if the message is forwarded.
* isAnouncement:
* type: boolean
* description: Indicates if the message is an anouncement.
* responses:
* 200:
* description: Message sent successfully.
Expand Down
68 changes: 68 additions & 0 deletions docs/api/user.swagger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1416,3 +1416,71 @@
* - Session not found, you are not allowed here!
* - You are not authorized to view these stories
*/

/**
* @swagger
* /users/fcm-token:
* patch:
* summary: Update the FCM token of the authenticated user
* description: This endpoint allows an authenticated user to update their Firebase Cloud Messaging (FCM) token.
* tags:
* - User
* security:
* - cookieAuth: []
* requestBody:
* required: true
* content:
* application/json:
* schema:
* type: object
* properties:
* fcmToken:
* type: string
* description: The FCM token to be updated.
* example: "aslkdfadslfdaskf"
* required:
* - fcmToken
* responses:
* 201:
* description: FCM token updated successfully.
* content:
* application/json:
* schema:
* type: object
* properties:
* status:
* type: string
* example: "success"
* message:
* type: string
* example: "User fcm token updated successfully"
* data:
* type: object
* example: {}
* 404:
* description: No user exists with the given ID.
* content:
* application/json:
* schema:
* type: object
* properties:
* status:
* type: string
* example: "error"
* message:
* type: string
* example: "No User exists with this ID"
* 500:
* description: Internal server error.
* content:
* application/json:
* schema:
* type: object
* properties:
* status:
* type: string
* example: "error"
* message:
* type: string
* example: "Internal Server Error"
*/
Loading
Loading