From 646be708fe7ec19ec6e8422baed664215ecc9633 Mon Sep 17 00:00:00 2001 From: vikasosmium <59792866+vikasosmium@users.noreply.github.com> Date: Thu, 12 Dec 2024 18:16:35 +0530 Subject: [PATCH 1/2] added one api contract --- users/README.md | 104 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) diff --git a/users/README.md b/users/README.md index 538991e..3c97c05 100644 --- a/users/README.md +++ b/users/README.md @@ -489,3 +489,107 @@ Archive users if not in Discord. "message": "An internal server error occurred" } ``` + +## PUT /users/:userId/intro + +Creating a User Intro in DB if not available + +- **Params** + None +- **Query** + None +- **Headers** + Content-Type: application/json +- **Cookie** + rds-session: `` +- **Body** + + ```json + { + "firstName": string, + "lastName": string, + "college": string, + "skills": string, + "city": string, + "state": string, + "country": string, + "foundFrom": string, + "introduction": string, + "funFact": string, + "whyRds": string, + "flowState": string, + "numberOfHours": number + } + ``` + +- **Success Response:** + - **Code:** 201 + - **Content:** + +```json +{ + "message": "User join data and newstatus data added and updated successfully" +} +``` + +- **Error Response:** + +- **Code:** 400 + + - **Content:** + +```json +{ + "statusCode": 400, + "error": "Bad Request", + "message": "{key} is required" +} +``` + +- **Code:** 401 + + - **Content:** + +```json +{ + "statusCode": 401, + "error": "Unauthorized", + "message": "Unauthenticated User" +} +``` + +- **Code:** 403 + + - **Content:** + +```json +{ + "statusCode": 403, + "error": "Forbidden", + "message": "Forbidden access" +} +``` + +- **Code:** 409 + + - **Content:** + +```json +{ + "statusCode": 409, + "error": "Conflict", + "message": "User data is already present!" +} +``` + +- **Code:** 500 + + - **Content:** + +```json +{ + "statusCode": 500, + "error": "Internal Server Error", + "message": "An internal server error occurred" +} +``` From cad8fced4e46dda38e64a323fc7267a3a1b782f0 Mon Sep 17 00:00:00 2001 From: vikasosmium <59792866+vikasosmium@users.noreply.github.com> Date: Thu, 12 Dec 2024 18:35:40 +0530 Subject: [PATCH 2/2] removed extra lines --- users/README.md | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/users/README.md b/users/README.md index 3c97c05..65eaeab 100644 --- a/users/README.md +++ b/users/README.md @@ -525,7 +525,6 @@ Creating a User Intro in DB if not available - **Success Response:** - **Code:** 201 - **Content:** - ```json { "message": "User join data and newstatus data added and updated successfully" @@ -535,9 +534,7 @@ Creating a User Intro in DB if not available - **Error Response:** - **Code:** 400 - - **Content:** - ```json { "statusCode": 400, @@ -547,9 +544,7 @@ Creating a User Intro in DB if not available ``` - **Code:** 401 - - **Content:** - ```json { "statusCode": 401, @@ -559,9 +554,7 @@ Creating a User Intro in DB if not available ``` - **Code:** 403 - - **Content:** - ```json { "statusCode": 403, @@ -571,9 +564,7 @@ Creating a User Intro in DB if not available ``` - **Code:** 409 - - **Content:** - ```json { "statusCode": 409, @@ -583,9 +574,7 @@ Creating a User Intro in DB if not available ``` - **Code:** 500 - - **Content:** - ```json { "statusCode": 500,