Touch-ups and adding drone pipeline
This commit is contained in:
@@ -4,6 +4,7 @@ import { Context, Next } from 'koa';
|
||||
export const errorHandler = async (ctx: Context, next: Next) => {
|
||||
try {
|
||||
await next();
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
} catch (error: any) {
|
||||
ctx.status = error.statusCode || error.status || StatusCodes.INTERNAL_SERVER_ERROR;
|
||||
error.status = ctx.status;
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Strategy as LocalStrategy } from 'passport-local';
|
||||
|
||||
import { authenticate } from '@mifi/auth-db/lib/api/authenticate';
|
||||
|
||||
export default new LocalStrategy(async (username: string, password: string, done: any) => {
|
||||
export default new LocalStrategy(async (username, password, done) => {
|
||||
const user = await authenticate(username, password);
|
||||
done(null, user);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user