How to use the typescript-rest.FormParam function in typescript-rest

To help you get started, we’ve selected a few typescript-rest examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github vellengs / typerx / packages / server / dist / modules / core / account.controller.js View on Github external
__metadata("design:paramtypes", []),
    __metadata("design:returntype", Promise)
], AccountController.prototype, "getConfig", null);
__decorate([
    typescript_rest_1.Path('search'),
    typescript_rest_1.GET,
    __param(0, typescript_rest_1.QueryParam('keyword')),
    __param(1, typescript_rest_1.QueryParam('value')),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", [String, String]),
    __metadata("design:returntype", Promise)
], AccountController.prototype, "getAccountsByKeyword", null);
__decorate([
    typescript_rest_1.Path('role'),
    typescript_rest_1.POST,
    __param(0, typescript_rest_1.FormParam('role')), __param(1, typescript_rest_1.FormParam('accountIds')),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", [String, Object]),
    __metadata("design:returntype", Promise)
], AccountController.prototype, "addAccountsToRole", null);
__decorate([
    typescript_rest_1.Path('role'),
    typescript_rest_1.DELETE,
    __param(0, typescript_rest_1.QueryParam('role')), __param(1, typescript_rest_1.QueryParam('id')),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", [String, String]),
    __metadata("design:returntype", Promise)
], AccountController.prototype, "removeAccountFromRole", null);
__decorate([
    typescript_rest_1.Path('query'),
    typescript_rest_1.GET,
    __param(0, typescript_rest_1.QueryParam('keyword')),
github vellengs / typerx / packages / server / dist / modules / core / api.controller.js View on Github external
__decorate([
    typescript_rest_1.Path('query'),
    typescript_rest_1.GET,
    __param(0, typescript_rest_1.QueryParam('keyword')),
    __param(1, typescript_rest_1.QueryParam('permission')),
    __param(2, typescript_rest_1.QueryParam('page')),
    __param(3, typescript_rest_1.QueryParam('size')),
    __param(4, typescript_rest_1.QueryParam('sort')),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", [String, String, Number, Number, String]),
    __metadata("design:returntype", Promise)
], ApiController.prototype, "query", null);
__decorate([
    typescript_rest_1.Path('permission'),
    typescript_rest_1.POST,
    __param(0, typescript_rest_1.FormParam('permission')), __param(1, typescript_rest_1.FormParam('ids')),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", [String, Array]),
    __metadata("design:returntype", Promise)
], ApiController.prototype, "addApisToPermission", null);
__decorate([
    typescript_rest_1.Path('permission'),
    typescript_rest_1.DELETE,
    __param(0, typescript_rest_1.QueryParam('permission')), __param(1, typescript_rest_1.QueryParam('id')),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", [String, String]),
    __metadata("design:returntype", Promise)
], ApiController.prototype, "removeApisToPermission", null);
ApiController = __decorate([
    typescript_rest_swagger_1.Tags('core'),
    typescript_rest_1.Path('/api/api'),
    __metadata("design:paramtypes", [Object])
github vellengs / typerx / packages / server / dist / modules / core / account.controller.js View on Github external
__metadata("design:paramtypes", []),
    __metadata("design:returntype", Promise)
], AccountController.prototype, "getConfig", null);
__decorate([
    typescript_rest_1.Path('search'),
    typescript_rest_1.GET,
    __param(0, typescript_rest_1.QueryParam('keyword')),
    __param(1, typescript_rest_1.QueryParam('value')),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", [String, String]),
    __metadata("design:returntype", Promise)
], AccountController.prototype, "getAccountsByKeyword", null);
__decorate([
    typescript_rest_1.Path('role'),
    typescript_rest_1.POST,
    __param(0, typescript_rest_1.FormParam('role')), __param(1, typescript_rest_1.FormParam('accountIds')),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", [String, Array]),
    __metadata("design:returntype", Promise)
], AccountController.prototype, "addAccountsToRole", null);
__decorate([
    typescript_rest_1.Path('role'),
    typescript_rest_1.DELETE,
    __param(0, typescript_rest_1.QueryParam('role')), __param(1, typescript_rest_1.QueryParam('id')),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", [String, String]),
    __metadata("design:returntype", Promise)
], AccountController.prototype, "removeAccountFromRole", null);
__decorate([
    typescript_rest_1.Path('query'),
    typescript_rest_1.GET,
    __param(0, typescript_rest_1.QueryParam('keyword')),
github vellengs / typerx / packages / server / dist / modules / core / user.controller.js View on Github external
__metadata("design:returntype", Promise)
], UserController.prototype, "logout", null);
__decorate([
    typescript_rest_1.POST,
    typescript_rest_1.Path("upload"),
    __param(0, typescript_rest_1.FileParam("file")),
    __param(1, typescript_rest_1.FormParam("field")),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", [Object, String]),
    __metadata("design:returntype", Promise)
], UserController.prototype, "fileUpload", null);
__decorate([
    typescript_rest_1.POST,
    typescript_rest_1.Path("umeditor/upload"),
    __param(0, typescript_rest_1.FileParam("upfile")),
    __param(1, typescript_rest_1.FormParam("field")),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", [Object, String]),
    __metadata("design:returntype", void 0)
], UserController.prototype, "umeditorUpload", null);
__decorate([
    typescript_rest_1.GET,
    typescript_rest_1.Path("upload"),
    __param(0, typescript_rest_1.QueryParam("action")),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", [String]),
    __metadata("design:returntype", Promise)
], UserController.prototype, "uploadConfig", null);
UserController = __decorate([
    typescript_rest_swagger_1.Tags('core'),
    typescript_rest_1.Path('/user'),
    typescript_rest_1.Preprocessor(interceptor_1.interceptor),