mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-10 02:54:15 +00:00
fix middlewares withAuthentication
This commit is contained in:
parent
eb75941d52
commit
94228561b1
@ -6,7 +6,7 @@ export default class PostsController extends Controller {
|
|||||||
static refName = "PostsController"
|
static refName = "PostsController"
|
||||||
//static useMiddlewares = ["withAuthentication"]
|
//static useMiddlewares = ["withAuthentication"]
|
||||||
|
|
||||||
methods = {
|
methods = {
|
||||||
createPost: async (payload) => {
|
createPost: async (payload) => {
|
||||||
const { user_id, message, additions } = payload
|
const { user_id, message, additions } = payload
|
||||||
|
|
||||||
@ -207,7 +207,7 @@ export default class PostsController extends Controller {
|
|||||||
|
|
||||||
put = {
|
put = {
|
||||||
"/post": {
|
"/post": {
|
||||||
middlewares: ["withAuthentification"],
|
middlewares: ["withAuthentication"],
|
||||||
fn: Schematized({
|
fn: Schematized({
|
||||||
required: ["message"],
|
required: ["message"],
|
||||||
select: ["message", "additions"],
|
select: ["message", "additions"],
|
||||||
@ -222,7 +222,7 @@ export default class PostsController extends Controller {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
"/toogle_like": {
|
"/toogle_like": {
|
||||||
middlewares: ["withAuthentification"],
|
middlewares: ["withAuthentication"],
|
||||||
fn: Schematized({
|
fn: Schematized({
|
||||||
required: ["post_id"],
|
required: ["post_id"],
|
||||||
select: ["post_id"],
|
select: ["post_id"],
|
||||||
@ -248,7 +248,7 @@ export default class PostsController extends Controller {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
"/like": {
|
"/like": {
|
||||||
middlewares: ["withAuthentification"],
|
middlewares: ["withAuthentication"],
|
||||||
fn: Schematized({
|
fn: Schematized({
|
||||||
required: ["post_id"],
|
required: ["post_id"],
|
||||||
select: ["post_id"],
|
select: ["post_id"],
|
||||||
@ -272,7 +272,7 @@ export default class PostsController extends Controller {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
"/unlike": {
|
"/unlike": {
|
||||||
middlewares: ["withAuthentification"],
|
middlewares: ["withAuthentication"],
|
||||||
fn: Schematized({
|
fn: Schematized({
|
||||||
required: ["post_id"],
|
required: ["post_id"],
|
||||||
select: ["post_id"],
|
select: ["post_id"],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user