Skip to content

Commit

Permalink
Merge pull request #204 from vikasosmium/Doc-Added-New-PUT-Route-for-…
Browse files Browse the repository at this point in the history
…User-Intro

DOC: Added an API contract for User Intro
  • Loading branch information
Achintya-Chatterjee authored Dec 19, 2024
2 parents cef4dfe + cad8fce commit 99e19a4
Showing 1 changed file with 93 additions and 0 deletions.
93 changes: 93 additions & 0 deletions users/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -489,3 +489,96 @@ 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: `<JWT>`
- **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"
}
```

0 comments on commit 99e19a4

Please sign in to comment.