|
@@ -19,14 +19,14 @@ type AuthResult = Option<unknown, {error: string}>;
|
|
export const post = async (req: ExpressRequest, res: ExpressResponse):
|
|
export const post = async (req: ExpressRequest, res: ExpressResponse):
|
|
Promise<ExpressResponse<AuthResult>> => {
|
|
Promise<ExpressResponse<AuthResult>> => {
|
|
if (!req.session) {
|
|
if (!req.session) {
|
|
- logger.error("WEB: req.session is not set up correctly!");
|
|
|
|
|
|
+ logger.warn("WEB: req.session is not set up correctly!");
|
|
return res.json({
|
|
return res.json({
|
|
ok: false,
|
|
ok: false,
|
|
error: "No session is set up. This is a server error!",
|
|
error: "No session is set up. This is a server error!",
|
|
});
|
|
});
|
|
}
|
|
}
|
|
if (!req.session.authTokenCode) {
|
|
if (!req.session.authTokenCode) {
|
|
- logger.error("WEB: attempted to join with no authTokenCode set!");
|
|
|
|
|
|
+ logger.warn("WEB: attempted to join with no authTokenCode set!");
|
|
return res.json({
|
|
return res.json({
|
|
ok: false,
|
|
ok: false,
|
|
error: "Authentication token is missing. Please try logging in again.",
|
|
error: "Authentication token is missing. Please try logging in again.",
|