Skip to content

Commit 99e19a4

Browse files
Merge pull request #204 from vikasosmium/Doc-Added-New-PUT-Route-for-User-Intro
DOC: Added an API contract for User Intro
2 parents cef4dfe + cad8fce commit 99e19a4

File tree

1 file changed

+93
-0
lines changed

1 file changed

+93
-0
lines changed

users/README.md

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,3 +489,96 @@ Archive users if not in Discord.
489489
"message": "An internal server error occurred"
490490
}
491491
```
492+
493+
## PUT /users/:userId/intro
494+
495+
Creating a User Intro in DB if not available
496+
497+
- **Params**
498+
None
499+
- **Query**
500+
None
501+
- **Headers**
502+
Content-Type: application/json
503+
- **Cookie**
504+
rds-session: `<JWT>`
505+
- **Body**
506+
507+
```json
508+
{
509+
"firstName": string,
510+
"lastName": string,
511+
"college": string,
512+
"skills": string,
513+
"city": string,
514+
"state": string,
515+
"country": string,
516+
"foundFrom": string,
517+
"introduction": string,
518+
"funFact": string,
519+
"whyRds": string,
520+
"flowState": string,
521+
"numberOfHours": number
522+
}
523+
```
524+
525+
- **Success Response:**
526+
- **Code:** 201
527+
- **Content:**
528+
```json
529+
{
530+
"message": "User join data and newstatus data added and updated successfully"
531+
}
532+
```
533+
534+
- **Error Response:**
535+
536+
- **Code:** 400
537+
- **Content:**
538+
```json
539+
{
540+
"statusCode": 400,
541+
"error": "Bad Request",
542+
"message": "{key} is required"
543+
}
544+
```
545+
546+
- **Code:** 401
547+
- **Content:**
548+
```json
549+
{
550+
"statusCode": 401,
551+
"error": "Unauthorized",
552+
"message": "Unauthenticated User"
553+
}
554+
```
555+
556+
- **Code:** 403
557+
- **Content:**
558+
```json
559+
{
560+
"statusCode": 403,
561+
"error": "Forbidden",
562+
"message": "Forbidden access"
563+
}
564+
```
565+
566+
- **Code:** 409
567+
- **Content:**
568+
```json
569+
{
570+
"statusCode": 409,
571+
"error": "Conflict",
572+
"message": "User data is already present!"
573+
}
574+
```
575+
576+
- **Code:** 500
577+
- **Content:**
578+
```json
579+
{
580+
"statusCode": 500,
581+
"error": "Internal Server Error",
582+
"message": "An internal server error occurred"
583+
}
584+
```

0 commit comments

Comments
 (0)