3 Commits

Author SHA1 Message Date
fbc1e55e5c Merge branch 'main' of ssh://git.mifi.dev:12022/mifi/auth 2023-05-09 19:15:25 -04:00
653fc7d52f promnotions 2023-05-09 19:15:01 -04:00
84881edb61 promnotions 2023-05-09 19:14:04 -04:00
3 changed files with 4 additions and 3 deletions

View File

@@ -210,3 +210,5 @@ depends_on:
trigger:
event:
- promote
target:
- production

View File

@@ -7,7 +7,6 @@ import Auth from '../../db/model/auth';
import { sign } from '../../utils/jwt';
import passport from '../passport';
import { ErrorCodes, getErrorBody } from '../../constants/errors';
import { authenticated } from '../middleware/authenication';
const routerOpts: Router.IRouterOptions = { prefix };
const router: Router = new Router(routerOpts);
@@ -44,7 +43,7 @@ router.post(process.env.RESET_ROUTE || RESET_ROUTE, async (ctx, next) => {
ctx.body = { success: false, ...getErrorBody(ErrorCodes.RESET_REQUEST_DATA) };
});
router.patch('/:record', authenticated(), (ctx: Koa.Context) => {
router.patch('/:record', (ctx: Koa.Context) => {
const data = Auth.findOneAndUpdate({ record: ctx.params.record });
if (!data) {
ctx.throw(StatusCodes.NOT_FOUND);

View File

@@ -1,6 +1,6 @@
{
"name": "@mifi/auth",
"version": "0.0.37",
"version": "0.0.36",
"author": "mifi (Mike Fitzpatrick)",
"license": "MIT",
"scripts": {