Merge remote-tracking branch 'origin/main'
This commit is contained in:
@@ -195,6 +195,7 @@ deckRouter.get('/:id', authRequired, async (req, res) => {
|
||||
}
|
||||
});
|
||||
|
||||
deckRouter.patch('/:id', authRequired, async (req, res) => {
|
||||
deckRouter.patch('/:id', authRequired, async (req, res) => {
|
||||
try {
|
||||
const deckId = req.params.id;
|
||||
@@ -228,6 +229,10 @@ deckRouter.patch('/:id', authRequired, async (req, res) => {
|
||||
return res.status(400).json({ error: 'Invalid input data', details: error.message });
|
||||
}
|
||||
|
||||
if (error instanceof Error && error.message.includes('admin')) {
|
||||
return res.status(403).json({ error: 'Forbidden: ' + error.message });
|
||||
}
|
||||
|
||||
if (error instanceof Error && error.message.includes('admin')) {
|
||||
return res.status(403).json({ error: 'Forbidden: ' + error.message });
|
||||
}
|
||||
|
||||
@@ -198,6 +198,7 @@ userRouter.post('/logout', authRequired, async (req, res) => {
|
||||
return ErrorResponseService.sendInternalServerError(res);
|
||||
}
|
||||
});
|
||||
<<<<<<< HEAD
|
||||
|
||||
// Refresh token endpoint
|
||||
userRouter.post('/refresh-token', async (req, res) => {
|
||||
@@ -336,4 +337,6 @@ userRouter.post('/reset-password',
|
||||
}
|
||||
});
|
||||
|
||||
=======
|
||||
>>>>>>> 83fad59878db015ec8d86bdec1ecbbca0baddfd2
|
||||
export default userRouter;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
* @swagger
|
||||
* components:
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
* securitySchemes:
|
||||
* bearerAuth:
|
||||
@@ -9,6 +10,8 @@
|
||||
* scheme: bearer
|
||||
* bearerFormat: JWT
|
||||
>>>>>>> origin/main
|
||||
=======
|
||||
>>>>>>> 83fad59878db015ec8d86bdec1ecbbca0baddfd2
|
||||
* schemas:
|
||||
* User:
|
||||
* type: object
|
||||
@@ -337,6 +340,9 @@
|
||||
* type: string
|
||||
*
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
>>>>>>> 83fad59878db015ec8d86bdec1ecbbca0baddfd2
|
||||
* Game:
|
||||
* type: object
|
||||
* properties:
|
||||
@@ -365,8 +371,11 @@
|
||||
* type: string
|
||||
* format: date-time
|
||||
*
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
>>>>>>> origin/main
|
||||
=======
|
||||
>>>>>>> 83fad59878db015ec8d86bdec1ecbbca0baddfd2
|
||||
* Error:
|
||||
* type: object
|
||||
* properties:
|
||||
@@ -378,6 +387,9 @@
|
||||
* details:
|
||||
* type: string
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
>>>>>>> 83fad59878db015ec8d86bdec1ecbbca0baddfd2
|
||||
*/
|
||||
/**
|
||||
* @swagger
|
||||
@@ -396,6 +408,7 @@
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Login successful
|
||||
<<<<<<< HEAD
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
@@ -435,6 +448,19 @@
|
||||
* schema:
|
||||
* $ref: '#/components/schemas/Error'
|
||||
>>>>>>> origin/main
|
||||
=======
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* $ref: '#/components/schemas/LoginResponse'
|
||||
* 401:
|
||||
* description: Invalid credentials
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* $ref: '#/components/schemas/Error'
|
||||
*
|
||||
>>>>>>> 83fad59878db015ec8d86bdec1ecbbca0baddfd2
|
||||
*
|
||||
* /api/users/create:
|
||||
* post:
|
||||
@@ -1498,6 +1524,9 @@
|
||||
* schema:
|
||||
* $ref: '#/components/schemas/Contact'
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
>>>>>>> 83fad59878db015ec8d86bdec1ecbbca0baddfd2
|
||||
*
|
||||
* /api/games/start:
|
||||
* post:
|
||||
@@ -1655,8 +1684,11 @@
|
||||
* description: Game already started or not ready to start
|
||||
* 500:
|
||||
* description: Internal server error
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
>>>>>>> origin/main
|
||||
=======
|
||||
>>>>>>> 83fad59878db015ec8d86bdec1ecbbca0baddfd2
|
||||
*/
|
||||
|
||||
export {};
|
||||
|
||||
@@ -100,6 +100,7 @@
|
||||
* type: string
|
||||
* format: email
|
||||
*
|
||||
<<<<<<< HEAD
|
||||
* ForgotPasswordRequest:
|
||||
* type: object
|
||||
* required:
|
||||
@@ -131,6 +132,8 @@
|
||||
* message:
|
||||
* type: string
|
||||
*
|
||||
=======
|
||||
>>>>>>> 83fad59878db015ec8d86bdec1ecbbca0baddfd2
|
||||
* Organization:
|
||||
* type: object
|
||||
* properties:
|
||||
@@ -460,6 +463,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
<<<<<<< HEAD
|
||||
* /api/users/verify-email/{token}:
|
||||
* get:
|
||||
* tags: [Users]
|
||||
@@ -539,6 +543,8 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
=======
|
||||
>>>>>>> 83fad59878db015ec8d86bdec1ecbbca0baddfd2
|
||||
* /api/organizations/search:
|
||||
* get:
|
||||
* tags: [Organizations]
|
||||
|
||||
Reference in New Issue
Block a user