Sunday, 22 March 2020

aex rev 0.7.0 with data filtering and validation annotation enabled.

aex``` class User {@http("post", "/user/login") @body() @filter({ body: { username: { type: "string", required: true, minLength: 4, maxLength: 20 }, password: { type: "string", required: true, minLength: 4, maxLength: 64 } } }) public async login(req: any, res: any, _scope: any) { // req.body.username // req.body.password}@http("get", "/profile/:id") @body() @query() @filter({ query: { page: { type: "numeric", required: true } }, params: { id: { type: "numeric", required: true } } }) public async id(req: any, res: any, _scope: any) { // req.params.id // req.query.page } } ```

Submitted March 23, 2020 at 04:33AM by calidion

No comments:

Post a Comment