refactor: make ensureAuthenticated async
This commit is contained in:
4
typings/pluginapi.d.ts
vendored
4
typings/pluginapi.d.ts
vendored
@ -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.
|
||||
|
Reference in New Issue
Block a user