oops, I broke the cached data script

This commit is contained in:
Emi Matchu 2020-09-02 23:19:50 -07:00
parent ba004ae656
commit dac7a682d4

View file

@ -1335,8 +1335,9 @@ const config = {
}; };
lastSvgLogger = svgLogger; lastSvgLogger = svgLogger;
const tokenMatch = (req.headers.authorization || "").match(/^Bearer (.+)$/); const auth = (req && req.headers && req.headers.authorization) || "";
const token = tokenMatch && tokenMatch[1]; const authMatch = auth.match(/^Bearer (.+)$/);
const token = authMatch && authMatch[1];
const currentUserId = await getUserIdFromToken(token); const currentUserId = await getUserIdFromToken(token);
return { return {