Skip to content

Commit 646be70

Browse files
committed
added one api contract
1 parent 829479e commit 646be70

File tree

1 file changed

+104
-0
lines changed

1 file changed

+104
-0
lines changed

users/README.md

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,3 +489,107 @@ 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+
529+
```json
530+
{
531+
"message": "User join data and newstatus data added and updated successfully"
532+
}
533+
```
534+
535+
- **Error Response:**
536+
537+
- **Code:** 400
538+
539+
- **Content:**
540+
541+
```json
542+
{
543+
"statusCode": 400,
544+
"error": "Bad Request",
545+
"message": "{key} is required"
546+
}
547+
```
548+
549+
- **Code:** 401
550+
551+
- **Content:**
552+
553+
```json
554+
{
555+
"statusCode": 401,
556+
"error": "Unauthorized",
557+
"message": "Unauthenticated User"
558+
}
559+
```
560+
561+
- **Code:** 403
562+
563+
- **Content:**
564+
565+
```json
566+
{
567+
"statusCode": 403,
568+
"error": "Forbidden",
569+
"message": "Forbidden access"
570+
}
571+
```
572+
573+
- **Code:** 409
574+
575+
- **Content:**
576+
577+
```json
578+
{
579+
"statusCode": 409,
580+
"error": "Conflict",
581+
"message": "User data is already present!"
582+
}
583+
```
584+
585+
- **Code:** 500
586+
587+
- **Content:**
588+
589+
```json
590+
{
591+
"statusCode": 500,
592+
"error": "Internal Server Error",
593+
"message": "An internal server error occurred"
594+
}
595+
```

0 commit comments

Comments
 (0)