https://github.com/arshtepe/decorators-router
https://github.com/arshtepe/decorators-router
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/arshtepe/decorators-router
- Owner: arshtepe
- License: mit
- Created: 2017-05-11T14:42:51.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-06-19T15:42:19.000Z (almost 8 years ago)
- Last Synced: 2025-03-03T04:33:07.269Z (3 months ago)
- Language: JavaScript
- Size: 18.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# decorators-router
### Alpha version
```js@Controller("/test")
export default class {@RequestMapping({value: "add", method: RequestMethod.POST})
async add(ctx) {
await service.doAction(ctx.request.body.files);
ctx.redirect("/plugin/list");
}@RequestMapping("/")// by default method GET
async uploadPageView({render}, params) {
await render("upload.html");
}@RequestMapping("list")
async list(ctx) {
return service.getList();
}
}
```