refactor: use strict typing

This commit is contained in:
Carlos Valente
2025-03-21 19:44:16 +01:00
committed by arc-alex
parent 14a7c04d3b
commit d48b2ae506
39 changed files with 339 additions and 246 deletions
+3 -1
View File
@@ -81,7 +81,9 @@ export function makeAuthenticateMiddleware(prefix: string) {
// we use query params for generating authenticated URLs and for clients like the companion module
// if the user gives is a token in the query params, we set the cookie to be used in further requests
if (req.query.token === hashedPassword) {
setSessionCookie(res, hashedPassword);
if (hashedPassword !== undefined) {
setSessionCookie(res, hashedPassword);
}
return next();
}