Skip to content

Commit

Permalink
Merge 3b455bc into f4204bf
Browse files Browse the repository at this point in the history
  • Loading branch information
horyd committed Aug 29, 2018
2 parents f4204bf + 3b455bc commit 9f7e89a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions lib/runOfflineHook.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@ function runOffline(serverless, options) {
const namespacedFunctions = {};
Object.keys(config.functions).forEach((key) => {
const func = config.functions[key];
func.events.forEach((event) => {
if (event.http) {
event.http.path = path.join(basePath, event.http.path);
}
});
if (func.events) {
func.events.forEach((event) => {
if (event.http) {
event.http.path = path.join(basePath, event.http.path);
}
});
}
namespacedFunctions[`${name}-${key}`] = func;
});
Object.assign(serverless.service.functions, namespacedFunctions);
Expand Down

0 comments on commit 9f7e89a

Please sign in to comment.