diff --git a/meetings/README.md b/meetings/README.md index 32fe3c8..3557798 100644 --- a/meetings/README.md +++ b/meetings/README.md @@ -40,23 +40,41 @@ 400 - "User is not authorized" -- **join** +- **subscribe** POST - - for both cases(current, incoming), same endpoint is used, no additional param is needed - - http://134.209.132.81:4000/api/v1/meetings/join + http://134.209.132.81:4000/api/v1/meetings/subscribe/{id} - Response - - A meeting scheduled for later (status=='incoming') and has not been added before + - A meeting has been added before + + 201 - meeting object + + - The meeting doesn't exist (wrong id) + + 400 - "The meeting doesn't exist" + + - Any other error (e.g db connection) + + 400 - error message - 201 - "Meeting added successfully" + - Authorization error + + 400 - "User is not authorized" + + - **join** + + POST + + http://134.209.132.81:4000/api/v1/meetings/join/{id} + + - Response - - A meeting scheduled for later (status=='incoming') and has been added before + - A meeting scheduled for later (status=='incoming') or not part of student's meetings - 201 - "Meeting already added before" + 400 - A meeting currently in progress (status=='current') diff --git a/meetings/src/routes/join.ts b/meetings/src/routes/join.ts index 60512b7..0006a9f 100644 --- a/meetings/src/routes/join.ts +++ b/meetings/src/routes/join.ts @@ -56,7 +56,7 @@ router.post(`${baseUrl}/join/:id`, async (req: Request, res: Response) => { return res.status(201).send(token); } - return res.status(400).send("Meeting hasn'r started yet"); + return res.status(400).send("Meeting hasn't started yet"); } } catch (error) { return res.status(400).send(error.message);