Skip to content

Commit dc73c6a

Browse files
th-280: Bug: When trying to create a shift for the driver, the 404 error (in Postman) and a 500 error (in swagger) appear for an unauthorized user (#298)
* th-280: * correct auth checking, path in swagger * th-280: * correct auth checking --------- Co-authored-by: Alina Kupchyk <[email protected]>
1 parent 2e7d506 commit dc73c6a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

backend/src/packages/shifts/shift.controller.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class ShiftController extends Controller {
3939
this.addRoute({
4040
path: ShiftsApiPath.ROOT,
4141
method: 'POST',
42-
authStrategy: AuthStrategy.INJECT_USER,
42+
authStrategy: AuthStrategy.VERIFY_JWT,
4343
validation: {
4444
body: shiftCreateValidationSchema,
4545
},
@@ -55,7 +55,7 @@ class ShiftController extends Controller {
5555
this.addRoute({
5656
path: ShiftsApiPath.$ID,
5757
method: 'PUT',
58-
authStrategy: AuthStrategy.INJECT_USER,
58+
authStrategy: AuthStrategy.VERIFY_JWT,
5959
validation: {
6060
body: shiftCloseValidationSchema,
6161
},
@@ -345,7 +345,7 @@ export { ShiftController };
345345

346346
/**
347347
* @swagger
348-
* /shifts/drive/{id}:
348+
* /shifts/driver/{id}:
349349
* get:
350350
* tags:
351351
* - shifts

0 commit comments

Comments
 (0)