Compare commits
4 Commits
0.0.36
...
1e1eac9dd6
| Author | SHA1 | Date | |
|---|---|---|---|
|
1e1eac9dd6
|
|||
|
7a0d5dc48c
|
|||
|
4ed4b6e5f4
|
|||
|
4499e20e77
|
@@ -165,10 +165,10 @@ steps:
|
||||
ROUTE_PREFIX: /auth
|
||||
PORT: 9001
|
||||
commands:
|
||||
- docker compose -f docker-compose.staging.yml pull
|
||||
- docker compose -f docker-compose.staging.yml build --no-cache
|
||||
- docker compose -f docker-compose.staging.yml rm --stop
|
||||
- docker compose -f docker-compose.staging.yml up --wait
|
||||
- docker compose -f docker-compose.staging_image.yml pull
|
||||
- docker compose -f docker-compose.staging_image.yml build --no-cache
|
||||
- docker compose -f docker-compose.staging_image.yml rm --stop
|
||||
- docker compose -f docker-compose.staging_image.yml up --wait
|
||||
volumes:
|
||||
- name: env-secrets
|
||||
path: /drone/grow/staging.env
|
||||
|
||||
@@ -7,6 +7,7 @@ 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);
|
||||
@@ -43,7 +44,7 @@ router.post(process.env.RESET_ROUTE || RESET_ROUTE, async (ctx, next) => {
|
||||
ctx.body = { success: false, ...getErrorBody(ErrorCodes.RESET_REQUEST_DATA) };
|
||||
});
|
||||
|
||||
router.patch('/:record', (ctx: Koa.Context) => {
|
||||
router.patch('/:record', authenticated(), (ctx: Koa.Context) => {
|
||||
const data = Auth.findOneAndUpdate({ record: ctx.params.record });
|
||||
if (!data) {
|
||||
ctx.throw(StatusCodes.NOT_FOUND);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@mifi/auth",
|
||||
"version": "0.0.36",
|
||||
"version": "0.0.37",
|
||||
"author": "mifi (Mike Fitzpatrick)",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user