SudoSOS Back-end API / vouchers / VoucherGroupController
Class: VoucherGroupController ​
The BaseController class is responsible for:
- Storing route definitions.
- Generating router objects based on the policy.
Extends ​
Constructors ​
Constructor ​
new VoucherGroupController(options): VoucherGroupController;Parameters ​
| Parameter | Type |
|---|---|
options | BaseControllerOptions |
Returns ​
VoucherGroupController
Overrides ​
Properties ​
| Property | Modifier | Type | Description | Inherited from |
|---|---|---|---|---|
roleManager | protected | RoleManager | A reference to the role manager passed in the base controller options. | BaseController.roleManager |
specification | public | SwaggerSpecification | A reference to the swagger specification passed in the base controller options. | BaseController.specification |
Methods ​
createVoucherGroup() ​
createVoucherGroup(req, res): Promise<void>;POST /vouchergroups
Parameters ​
| Parameter | Type |
|---|---|
req | RequestWithToken |
res | Response |
Returns ​
Promise<void>
200 - The created voucher group entity
Operation Id ​
createVouchergroup
Tags ​
vouchergroups - Operations of voucher group controller
Security ​
JWT
getAllVoucherGroups() ​
getAllVoucherGroups(req, res): Promise<void>;GET /vouchergroups
Parameters ​
| Parameter | Type |
|---|---|
req | RequestWithToken |
res | Response |
Returns ​
Promise<void>
200 - All existingvoucher groups without users
Operation Id ​
getAllVouchergroups
Tags ​
vouchergroups - Operations of voucher group controller
Security ​
JWT
getPolicy() ​
getPolicy(): Policy;Gets the policy defined by child classes. This policy includes all routes that the controller accepts, the authorization middleware, and the final handler function for every route.
Returns ​
The policy of this controller.
Overrides ​
getRouter() ​
getRouter(): Router;Returns ​
Router
the router used by this controller.
Inherited from ​
getVoucherGroupById() ​
getVoucherGroupById(req, res): Promise<void>;GET /vouchergroups/
Parameters ​
| Parameter | Type |
|---|---|
req | RequestWithToken |
res | Response |
Returns ​
Promise<void>
200 - The requested voucher group entity
Operation Id ​
getVouchergroupId
Tags ​
vouchergroups - Operations of voucher group controller
Security ​
JWT
updateVoucherGroup() ​
updateVoucherGroup(req, res): Promise<void>;PATCH /vouchergroups/
Parameters ​
| Parameter | Type |
|---|---|
req | RequestWithToken |
res | Response |
Returns ​
Promise<void>
200 - The requested voucher group entity
Operation Id ​
updateVoucherGroup
Tags ​
vouchergroups - Operations of voucher group controller
Security ​
JWT