1
0
mirror of https://gitlab.com/comunic/comunicapiv2 synced 2024-12-27 22:18:52 +00:00

Fix scope issue

This commit is contained in:
Pierre HUBERT 2019-11-23 15:23:48 +01:00
parent 53a616da15
commit 1ff0a72b70
2 changed files with 11 additions and 11 deletions

View File

@ -27,20 +27,20 @@ export const Routes : Route[] = [
{type: RouteType.GET, path: "/", cb: WelcomeController.HomeMessage, needLogin: false},
// Account controller
{path: "/account/login", cb: AccountController.LoginUser, needLogin: false},
{path: "/user/connectUSER", cb: AccountController.LoginUser, needLogin: false}, // Legacy
{path: "/account/login", cb: (h) => AccountController.LoginUser(h), needLogin: false},
{path: "/user/connectUSER", cb: (h) => AccountController.LoginUser(h), needLogin: false}, // Legacy
{path: "/account/logout", cb: AccountController.LogoutUser},
{path: "/user/disconnectUSER", cb: AccountController.LogoutUser}, // Legacy
{path: "/account/logout", cb: (h) => AccountController.LogoutUser(h)},
{path: "/user/disconnectUSER", cb: (h) => AccountController.LogoutUser(h)}, // Legacy
{path: "/account/id", cb: AccountController.CurrentUserID},
{path: "/user/getCurrentUserID", cb: AccountController.CurrentUserID}, // Legacy
{path: "/account/id", cb: (h) => AccountController.CurrentUserID(h)},
{path: "/user/getCurrentUserID", cb: (h) => AccountController.CurrentUserID(h)}, // Legacy
// User controller
{path: "/user/getInfo", cb: UserController.GetSingle, needLogin: false},
{path: "/user/getInfos", cb: UserController.GetSingle, needLogin: false}, // Legacy
{path: "/user/getInfo", cb: (h) => UserController.GetSingle(h), needLogin: false},
{path: "/user/getInfos", cb: (h) => UserController.GetSingle(h), needLogin: false}, // Legacy
{path: "/user/getInfoMultiple", cb: UserController.GetMultiple, needLogin: false},
{path: "/user/getInfosMultiple", cb: UserController.GetMultiple, needLogin: false}, // Legacy
{path: "/user/getInfoMultiple", cb: (h) => UserController.GetMultiple(h), needLogin: false},
{path: "/user/getInfosMultiple", cb: (h) => UserController.GetMultiple(h), needLogin: false}, // Legacy
]

View File

@ -20,7 +20,7 @@ export class UserController {
if(!user)
handler.error(404, "Could not get user data!");
handler.send(UserController.UserToAPI(user));
handler.send(this.UserToAPI(user));
}
/**