lambder 1.0.91 → 1.0.93
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Readme.md +0 -3
- package/dist/Lambder.js +1 -1
- package/package.json +1 -1
- package/src/Lambder.ts +1 -1
package/Readme.md
CHANGED
|
@@ -108,9 +108,6 @@ lambder.addApi("getCompanyPage", async (ctx, res) => {
|
|
|
108
108
|
|
|
109
109
|
|
|
110
110
|
### Adding Routes
|
|
111
|
-
|
|
112
|
-
For more details on route matching, please check [path-to-regexp](https://www.npmjs.com/package/path-to-regexp) package.
|
|
113
|
-
|
|
114
111
|
```typescript
|
|
115
112
|
// Route with parameters
|
|
116
113
|
lambder.addRoute("/user/:userId", async (ctx, res) => {
|
package/dist/Lambder.js
CHANGED
|
@@ -115,7 +115,7 @@ export default class Lambder {
|
|
|
115
115
|
await moduleFn(this);
|
|
116
116
|
}
|
|
117
117
|
async importModule(moduleImport) {
|
|
118
|
-
await (await moduleImport).default
|
|
118
|
+
await this.addModule((await moduleImport).default);
|
|
119
119
|
}
|
|
120
120
|
addRoute(condition, actionFn) {
|
|
121
121
|
this.actionList.push({
|
package/package.json
CHANGED
package/src/Lambder.ts
CHANGED
|
@@ -166,7 +166,7 @@ export default class Lambder {
|
|
|
166
166
|
}
|
|
167
167
|
|
|
168
168
|
async importModule(moduleImport: Promise<{ default: LambderModuleFunction }>): Promise<void>{
|
|
169
|
-
await (await moduleImport).default
|
|
169
|
+
await this.addModule((await moduleImport).default);
|
|
170
170
|
}
|
|
171
171
|
|
|
172
172
|
addRoute(condition: Path|ConditionFunction|RegExp, actionFn: ActionFunction):void{
|