Add returns on pusher endpoints

This commit is contained in:
Alexis Faizeau 2022-03-11 16:25:30 +01:00
parent 2a73400f7c
commit 36646cbdbe
6 changed files with 7 additions and 0 deletions

View File

@ -61,6 +61,7 @@ export class AdminController extends BaseHttpController {
}
res.send("ok");
return;
});
}

View File

@ -371,6 +371,7 @@ export class AuthenticateController extends BaseHttpController {
//get login profile
res.status(302);
res.setHeader("Location", adminApi.getProfileUrl(authTokenData.accessToken));
res.send("");
return;
} catch (error) {
this.castErrorToResponse(error, res);

View File

@ -37,9 +37,11 @@ export class BaseHttpController {
" " +
(e.response.data && e.response.data.message ? e.response.data.message : e.response.statusText)
);
return;
} else {
res.status(500);
res.send("An error occurred");
return;
}
}
}

View File

@ -159,6 +159,7 @@ export class MapController extends BaseHttpController {
}
res.json(mapDetails);
return;
} catch (e) {
this.castErrorToResponse(e, res);
}

View File

@ -23,6 +23,7 @@ export class OpenIdProfileController extends BaseHttpController {
resCheckTokenAuth.picture as string | undefined
)
);
return;
} catch (error) {
console.error("profileCallback => ERROR", error);
this.castErrorToResponse(error, res);

View File

@ -7,6 +7,7 @@ export class WokaListController extends BaseHttpController {
routes() {
this.app.options("/woka/list/:roomUrl", {}, (req, res) => {
res.status(200).send("");
return;
});
// eslint-disable-next-line @typescript-eslint/no-misused-promises