mirror of
https://gitlab.com/comunic/comunicapiv2
synced 2024-11-26 07:19:23 +00:00
Fix scope issue
This commit is contained in:
parent
53a616da15
commit
1ff0a72b70
@ -27,20 +27,20 @@ export const Routes : Route[] = [
|
|||||||
{type: RouteType.GET, path: "/", cb: WelcomeController.HomeMessage, needLogin: false},
|
{type: RouteType.GET, path: "/", cb: WelcomeController.HomeMessage, needLogin: false},
|
||||||
|
|
||||||
// Account controller
|
// Account controller
|
||||||
{path: "/account/login", cb: AccountController.LoginUser, needLogin: false},
|
{path: "/account/login", cb: (h) => AccountController.LoginUser(h), needLogin: false},
|
||||||
{path: "/user/connectUSER", cb: AccountController.LoginUser, needLogin: false}, // Legacy
|
{path: "/user/connectUSER", cb: (h) => AccountController.LoginUser(h), needLogin: false}, // Legacy
|
||||||
|
|
||||||
{path: "/account/logout", cb: AccountController.LogoutUser},
|
{path: "/account/logout", cb: (h) => AccountController.LogoutUser(h)},
|
||||||
{path: "/user/disconnectUSER", cb: AccountController.LogoutUser}, // Legacy
|
{path: "/user/disconnectUSER", cb: (h) => AccountController.LogoutUser(h)}, // Legacy
|
||||||
|
|
||||||
{path: "/account/id", cb: AccountController.CurrentUserID},
|
{path: "/account/id", cb: (h) => AccountController.CurrentUserID(h)},
|
||||||
{path: "/user/getCurrentUserID", cb: AccountController.CurrentUserID}, // Legacy
|
{path: "/user/getCurrentUserID", cb: (h) => AccountController.CurrentUserID(h)}, // Legacy
|
||||||
|
|
||||||
|
|
||||||
// User controller
|
// User controller
|
||||||
{path: "/user/getInfo", cb: UserController.GetSingle, needLogin: false},
|
{path: "/user/getInfo", cb: (h) => UserController.GetSingle(h), needLogin: false},
|
||||||
{path: "/user/getInfos", cb: UserController.GetSingle, needLogin: false}, // Legacy
|
{path: "/user/getInfos", cb: (h) => UserController.GetSingle(h), needLogin: false}, // Legacy
|
||||||
|
|
||||||
{path: "/user/getInfoMultiple", cb: UserController.GetMultiple, needLogin: false},
|
{path: "/user/getInfoMultiple", cb: (h) => UserController.GetMultiple(h), needLogin: false},
|
||||||
{path: "/user/getInfosMultiple", cb: UserController.GetMultiple, needLogin: false}, // Legacy
|
{path: "/user/getInfosMultiple", cb: (h) => UserController.GetMultiple(h), needLogin: false}, // Legacy
|
||||||
]
|
]
|
@ -20,7 +20,7 @@ export class UserController {
|
|||||||
if(!user)
|
if(!user)
|
||||||
handler.error(404, "Could not get user data!");
|
handler.error(404, "Could not get user data!");
|
||||||
|
|
||||||
handler.send(UserController.UserToAPI(user));
|
handler.send(this.UserToAPI(user));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user