Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC: Added an API contract for User Intro #204

Merged
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
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"
}
```