Compare commits

..

4 Commits

6 changed files with 30 additions and 5 deletions

View File

@ -23,7 +23,11 @@ Get single army member information
+ Response 200 + Response 200
+ Attributes (array[User]) + Headers
X-Total-Count: 1
+ Attributes (array[User], fixed-type)
### GET User [GET /users/{id}] ### GET User [GET /users/{id}]
@ -35,4 +39,4 @@ Get single army member information
+ Response 200 + Response 200
+ Attributes (User) + Attributes (User, fixed-type)

View File

@ -21,8 +21,7 @@ https://cc.myserver.lan/api/
## Authentication ## Authentication
Requests to the API have to be authenticated using an API token which is received after successfully providing your application credentials to the API. Requests to most of the API endpoints have to be authenticated using an API token which is received after successfully providing your application credentials to the API.
Once acquired the token has to be provided in the ``X-Access-Token`` header of every request that requires authentication. Once acquired the token has to be provided in the ``X-Access-Token`` header of every request that requires authentication.

View File

@ -0,0 +1 @@
{"_id":{"$oid":"5aba5504eadcce6332c6a775"},"name":"Gefreiter","fraction":"BLUFOR","level":0,"timestamp":{"$date":"2018-03-27T14:28:20.948Z"},"updatedAt":{"$date":"2018-03-27T14:28:20.948Z"},"__v":0}

View File

@ -0,0 +1 @@
{"_id":{"$oid":"5aba54eaeadcce6332c6a774"},"sortingNumber":0,"name":"Alpha","fraction":"BLUFOR","timestamp":{"$date":"2018-03-27T14:27:54.399Z"},"updatedAt":{"$date":"2018-03-27T14:27:54.399Z"},"__v":0}

View File

@ -1 +1 @@
{"_id":{"$oid":"5ab68d42f547ed304064e5f7"},"rankLvl":0,"squadId":null,"username":"user1","timestamp":{"$date":"2018-03-24T17:39:14.841Z"},"updatedAt":{"$date":"2018-03-24T17:39:14.841Z"},"__v":0} {"_id":{"$oid":"5ab68d42f547ed304064e5f7"},"rankLvl":0,"squadId":{"$oid":"5aba54eaeadcce6332c6a774"},"username":"hardiready","updatedAt":{"$date":"2018-03-27T14:28:04.533Z"},"__v":0}

View File

@ -0,0 +1,20 @@
#!/usr/bin/env bash
# execute script in its location folder
cd $(dirname $0)
DB_NAME="cc-test"
# array of available collection names
col=(app_user awarding campaign decoration logBudget logFlag logKill logPoints logRespawn logRevive logTransport player promotion rank squad user war)
for i in "${col[@]}"
do
if [ "$1" == "import" ]
then
mongoimport --db ${DB_NAME} --collection $i --drop --file ${i}.json
else
echo -e "$(date "+%Y-%m-%dT%T.%3N%z")\tTable: ${i}"
mongoexport --db ${DB_NAME} --collection $i --out ${i}.json;
fi
done