From 94228561b1431a93e3e1610757699274c091f6d4 Mon Sep 17 00:00:00 2001 From: srgooglo Date: Mon, 5 Sep 2022 04:40:15 +0200 Subject: [PATCH] fix middlewares `withAuthentication` --- .../server/src/controllers/PostsController/index.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/server/src/controllers/PostsController/index.js b/packages/server/src/controllers/PostsController/index.js index dbb50e18..dc2773f0 100644 --- a/packages/server/src/controllers/PostsController/index.js +++ b/packages/server/src/controllers/PostsController/index.js @@ -6,7 +6,7 @@ export default class PostsController extends Controller { static refName = "PostsController" //static useMiddlewares = ["withAuthentication"] - methods = { +methods = { createPost: async (payload) => { const { user_id, message, additions } = payload @@ -207,7 +207,7 @@ export default class PostsController extends Controller { put = { "/post": { - middlewares: ["withAuthentification"], + middlewares: ["withAuthentication"], fn: Schematized({ required: ["message"], select: ["message", "additions"], @@ -222,7 +222,7 @@ export default class PostsController extends Controller { }) }, "/toogle_like": { - middlewares: ["withAuthentification"], + middlewares: ["withAuthentication"], fn: Schematized({ required: ["post_id"], select: ["post_id"], @@ -248,7 +248,7 @@ export default class PostsController extends Controller { }) }, "/like": { - middlewares: ["withAuthentification"], + middlewares: ["withAuthentication"], fn: Schematized({ required: ["post_id"], select: ["post_id"], @@ -272,7 +272,7 @@ export default class PostsController extends Controller { }) }, "/unlike": { - middlewares: ["withAuthentification"], + middlewares: ["withAuthentication"], fn: Schematized({ required: ["post_id"], select: ["post_id"],