Skip to content
This repository has been archived by the owner on Jul 2, 2020. It is now read-only.

Commit

Permalink
fix: lambda params can't use ...args (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
kurten authored and czy88840616 committed Jan 8, 2020
1 parent 537efac commit 3c18e50
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/serverless-fc-starter/src/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {
FAAS_ARGS_KEY,
ServerlessLightRuntime,
} from '@midwayjs/runtime-engine';
import { AliyunFCContext } from './interface';
import { Context } from './context';

export class FCRuntime extends ServerlessLightRuntime {
Expand All @@ -16,7 +15,8 @@ export class FCRuntime extends ServerlessLightRuntime {
throw new TypeError('Must be an AsyncFunction');
}

return (req: object, res: object, context?: AliyunFCContext) => {
return (...args) => {
const [req, res, context] = args;
if (context) {
return this.wrapperWebInvoker(handler, req, res, context);
} else {
Expand Down

0 comments on commit 3c18e50

Please sign in to comment.