Archived
1
0

refactor: make ensureAuthenticated async

This commit is contained in:
Joe Previte
2021-06-02 13:27:55 -07:00
parent 0cdbd33b46
commit 91303d4e40
4 changed files with 8 additions and 8 deletions

View File

@ -145,12 +145,12 @@ export const proxy: ProxyServer
/**
* Middleware to ensure the user is authenticated. Throws if they are not.
*/
export function ensureAuthenticated(req: express.Request, res?: express.Response, next?: express.NextFunction): void
export function ensureAuthenticated(req: express.Request, res?: express.Response, next?: express.NextFunction): Promise<void>
/**
* Returns true if the user is authenticated.
*/
export function authenticated(req: express.Request): boolean
export function authenticated(req: express.Request): Promise<void>
/**
* Replace variables in HTML: TO, BASE, CS_STATIC_BASE, and OPTIONS.