66 lines
2.1 KiB
Plaintext
66 lines
2.1 KiB
Plaintext
### GET Promotions [GET /promotion{?squadId,inProgress,fractFilter}]
|
|
|
|
List all promotion requests
|
|
|
|
+ Parameters
|
|
+ squadId: `591470249e9fae286e008e31` (string, optional)
|
|
specific squad Id to show the promotion requests for
|
|
|
|
+ inProgress: false (boolean, optional)
|
|
true to filter by promotion state 'in progress'
|
|
|
|
+ Default: false
|
|
|
|
+ fractFilter: `BLUFOR` (enum[string], optional)
|
|
Field to filter by fraction
|
|
|
|
+ Members
|
|
+ `BLUFOR`
|
|
+ `OPFOR`
|
|
+ `GLOBAL`
|
|
|
|
+ Response 200
|
|
|
|
+ Attributes (array[Promotion])
|
|
|
|
### Create Promotion Proposal [POST /request/promotion]
|
|
|
|
Create a new proposal for a promotion, that needs to be approved by higher permission level user to take effect
|
|
|
|
*Permission: 1*
|
|
|
|
+ Request (application/json)
|
|
|
|
+ Attributes
|
|
+ userId: `5ab68d42f547ed304064e5f7` (string, required) - id of the army member to promote
|
|
+ oldRankLvl: 0 (number, required) - previous rank level
|
|
+ newRankLvl: 5 (number, required) - new rank level to apply
|
|
|
|
+ Response 201
|
|
|
|
+ Attributes (Promotion, fixed-type)
|
|
|
|
|
|
### Update Promotion Proposal [PATCH /request/promotion/{id}]
|
|
|
|
Update the promotion proposal
|
|
|
|
*Permission: 2*
|
|
|
|
+ Parameters
|
|
+ id: `5abf50d9861d950f157c4a0a` (string, required) - unique id of the promotion
|
|
|
|
+ Request (application/json)
|
|
|
|
+ Attributes
|
|
+ _id: `5abf50d9861d950f157c4a0a` (string, optional) - id of the promotion proposal
|
|
+ userId: `5ab68d42f547ed304064e5f7` (string, optional) - id of the army member to promote
|
|
+ proposer: `5abf5064861d950f157c4a09` (string, optional) - id of the proposing app user
|
|
+ oldRankLvl: 0 (number, optional) - previous rank level
|
|
+ newRankLvl: 5 (number, optional) - new rank level to apply
|
|
+ confirmed: 1 (number, optional) confirmation status of the promotion (0 - in progress, 1 - approved & applied, 2 - rejected) \nThis automatically applies the *newRankLvl*value as new rank level to the target user when confirmed = 1
|
|
|
|
+ Response 200
|
|
|
|
+ Attributes (Promotion, fixed-type)
|