|
|
|
@ -124,10 +124,10 @@ const SetupApp = (app: any, knex: Knex, apiBaseUrl: string) => { |
|
|
|
|
app.post(apiBaseUrl + api.MergeTagEndpoint, checkLogin(), _invoke(MergeTagEndpointHandler)); |
|
|
|
|
app.post(apiBaseUrl + api.RegisterUserEndpoint, _invoke(RegisterUserEndpointHandler)); |
|
|
|
|
|
|
|
|
|
app.post('/login', passport.authenticate('local'), (req: any, res: any) => { |
|
|
|
|
app.post(apiBaseUrl + '/login', passport.authenticate('local'), (req: any, res: any) => { |
|
|
|
|
res.status(200).send({ userId: req.user.id }); |
|
|
|
|
}); |
|
|
|
|
app.post('/logout', function (req: any, res: any) { |
|
|
|
|
app.post(apiBaseUrl + '/logout', function (req: any, res: any) { |
|
|
|
|
req.logout(); |
|
|
|
|
res.status(200).send(); |
|
|
|
|
}); |
|
|
|
|