0.0.6 • Published 7 years ago

decorators-router v0.0.6

Weekly downloads
4
License
MIT
Repository
github
Last release
7 years ago

decorators-router

Alpha version

@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();
    }
}
0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago