Skip to content

Commit

Permalink
Worker accept all method
Browse files Browse the repository at this point in the history
  • Loading branch information
duyet committed Mar 22, 2020
1 parent 09179a3 commit 2804aba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions worker-functions/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ app
.use(router.routes())
.use(router.allowedMethods());

router.get('/ping', (ctx, next) => {
router.all('/ping', (ctx, next) => {
ctx.body = 'pong';
});

router.get('/:function', async (ctx, next) => {
router.all('/:function', async (ctx, next) => {
const functionName = ctx.params.function;
if (['pullData', 'updateInfo'].indexOf(functionName) === -1) {
ctx.body = { err: 1 };
Expand Down

0 comments on commit 2804aba

Please sign in to comment.