From f8db29408f86df00e1b4151e5e8ee6b3b366529f Mon Sep 17 00:00:00 2001 From: Florian Hartwich Date: Thu, 29 Mar 2018 17:13:55 +0200 Subject: [PATCH] Add GET ranks to apib --- api/apib/army-management/promotions.apib | 1 - api/apib/army-management/ranks.apib | 18 ++++++++++++++++++ api/apib/data_structures/_rank.apib | 16 ++++++++++++++++ api/apib/data_structures/index.apib | 2 ++ api/apib/dev-doc.apib | 2 ++ static/src/app/app.component.ts | 2 +- 6 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 api/apib/army-management/ranks.apib create mode 100644 api/apib/data_structures/_rank.apib diff --git a/api/apib/army-management/promotions.apib b/api/apib/army-management/promotions.apib index 09dea0f..ff52cf0 100644 --- a/api/apib/army-management/promotions.apib +++ b/api/apib/army-management/promotions.apib @@ -19,7 +19,6 @@ List all promotion requests + `OPFOR` + `GLOBAL` - + Response 200 + Attributes (array[Promotion]) diff --git a/api/apib/army-management/ranks.apib b/api/apib/army-management/ranks.apib new file mode 100644 index 0000000..ad32099 --- /dev/null +++ b/api/apib/army-management/ranks.apib @@ -0,0 +1,18 @@ +### GET Ranks [GET /ranks{?q,fractFilter}] + +List all ranks + ++ Parameters + + q: `Gefr` (string, optional) - filter string which filters for partial username + + + fractFilter (enum[string], optional) + Field to filter by fraction + + + Members + + `BLUFOR` + + `OPFOR` + + `GLOBAL` + ++ Response 200 + + + Attributes (array[Rank]) diff --git a/api/apib/data_structures/_rank.apib b/api/apib/data_structures/_rank.apib new file mode 100644 index 0000000..038ceb8 --- /dev/null +++ b/api/apib/data_structures/_rank.apib @@ -0,0 +1,16 @@ +# Rank (object) + +A rank that can be applied to army members by level/fraction + +## Properties ++ _id: `591469c9ef4a6810623ed4ea` (string, required) - the unique id of the rank ++ name: `Gefreiter` - display name of the rank ++ fraction: `BLUFOR` - enum expressing the fraction in which the decoration is given + + Members + + `BLUFOR` + + `OPFOR` + + `GLOBAL` ++ level: 1 - rank level ++ updatedAt: `2017-09-20T20:25:29.995Z` (string, required) - the version timestamp ++ timestamp: `2017-05-11T13:40:25.051Z` - the creation timestamp ++ __v: 1 - version number diff --git a/api/apib/data_structures/index.apib b/api/apib/data_structures/index.apib index 9f2c0ca..111d484 100644 --- a/api/apib/data_structures/index.apib +++ b/api/apib/data_structures/index.apib @@ -12,6 +12,8 @@ :[Gists](_promotion.apib) +:[Gists](_rank.apib) + :[Gists](_squad.apib) :[Gists](_user.apib) diff --git a/api/apib/dev-doc.apib b/api/apib/dev-doc.apib index b755033..1c3d875 100644 --- a/api/apib/dev-doc.apib +++ b/api/apib/dev-doc.apib @@ -42,6 +42,8 @@ FORMAT: 1A # Group Ranks +:[Gists](army-management/ranks.apib) + # Group Requests :[Gists](army-management/promotions.apib) diff --git a/static/src/app/app.component.ts b/static/src/app/app.component.ts index 8e396c7..9679304 100644 --- a/static/src/app/app.component.ts +++ b/static/src/app/app.component.ts @@ -23,7 +23,7 @@ export class AppComponent implements OnInit { scrollBtnVisibleVal = 100; - version = 'v' + require('./../../../package.json').version; + version = 'v'.concat(require('./../../../package.json').version); constructor(public loginService: LoginService, private promotionService: PromotionService,