diff --git a/server/src/likes/web/add-like.controller.ts b/server/src/likes/web/add-like.controller.ts index 311a61b..b8b365a 100644 --- a/server/src/likes/web/add-like.controller.ts +++ b/server/src/likes/web/add-like.controller.ts @@ -6,7 +6,7 @@ import { StatusCodes } from 'http-status-codes'; import { addLike } from '../application/add-like.service'; const addLikeHandler = ({ params: { id }, headers }: Request, res: Response) => { - const accessToken = headers.authorization?.split('Bearer ')[1]; + const accessToken = headers.authorization; ResponseHandler(() => addLike(accessToken, Number(id)), StatusCodes.CREATED, res); };