From e1c5503114deef954731904695cd40dccfcef555 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 23 Apr 2020 11:36:50 +0200 Subject: Support logout and add id and pass tests --- server/middlewares/oauth.ts | 2 +- server/middlewares/validators/themes.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'server/middlewares') diff --git a/server/middlewares/oauth.ts b/server/middlewares/oauth.ts index 4ae7f18c2..9d0eaa51f 100644 --- a/server/middlewares/oauth.ts +++ b/server/middlewares/oauth.ts @@ -2,7 +2,7 @@ import * as express from 'express' import { logger } from '../helpers/logger' import { Socket } from 'socket.io' import { getAccessToken } from '../lib/oauth-model' -import { handleIdAndPassLogin, oAuthServer } from '@server/lib/auth' +import { oAuthServer } from '@server/lib/auth' function authenticate (req: express.Request, res: express.Response, next: express.NextFunction, authenticateInQuery = false) { const options = authenticateInQuery ? { allowBearerTokensInQueryString: true } : {} diff --git a/server/middlewares/validators/themes.ts b/server/middlewares/validators/themes.ts index 24a9673f7..82794656d 100644 --- a/server/middlewares/validators/themes.ts +++ b/server/middlewares/validators/themes.ts @@ -16,7 +16,7 @@ const serveThemeCSSValidator = [ if (areValidationErrors(req, res)) return - const theme = PluginManager.Instance.getRegisteredTheme(req.params.themeName) + const theme = PluginManager.Instance.getRegisteredThemeByShortName(req.params.themeName) if (!theme || theme.version !== req.params.themeVersion) { return res.sendStatus(404) -- cgit v1.2.3