fix api tests

pull/33/head
HardiReady 2018-04-15 13:47:48 +02:00
parent 8b3151db53
commit db1222d0d5
5 changed files with 18 additions and 12 deletions

View File

@ -77,3 +77,9 @@
+ `BLUFOR` + `BLUFOR`
+ `OPFOR` + `OPFOR`
+ `NONE` + `NONE`
+ vehicleClass: `LIGHT` (enum, required) - class of shot vehicle
+ Members
+ `LIGHT`
+ `HEAVY`
+ `AIR`
+ `UNKNOWN`

View File

@ -7,7 +7,9 @@ Basic player statistic information object
+ fraction: `OPFOR` (string, required) - fraction of the player + fraction: `OPFOR` (string, required) - fraction of the player
+ kill: 5 (number, required) - sum of kills + kill: 5 (number, required) - sum of kills
+ friendlyFire: 0 (number, required) - sum of friendly fire kills + friendlyFire: 0 (number, required) - sum of friendly fire kills
+ vehicle: 1 (number, required) - sum of vehicle kills + vehicleLight: 1 (number, required) - sum of light vehicle kills
+ vehicleHeavy: 1 (number, required) - sum of heavy vehicle kills
+ vehicleAir: 0 (number, required) - sum of air vehicle kills
+ death: 3 (number, required) - sum of deaths + death: 3 (number, required) - sum of deaths
+ respawn: 2 (number, required) - sum of respawns + respawn: 2 (number, required) - sum of respawns
+ flagTouch: 1 (number, required) - sum of flag captures + flagTouch: 1 (number, required) - sum of flag captures

View File

@ -12,7 +12,9 @@ Every highscore player object contains a field *sum*, representing its order num
+ kill (array[HighscorePlayer],required) - player highscore for kill + kill (array[HighscorePlayer],required) - player highscore for kill
+ death (array[HighscorePlayer],required) - player highscore for death + death (array[HighscorePlayer],required) - player highscore for death
+ friendlyFire (array[HighscorePlayer],required) - player highscore for friendly fire + friendlyFire (array[HighscorePlayer],required) - player highscore for friendly fire
+ vehicle (array[HighscorePlayer],required) - player highscore for vehicle + vehicleLight (array[HighscorePlayer],required) - player highscore for light vehicle
+ vehicleHeavy (array[HighscorePlayer],required) - player highscore for heavy vehicle
+ vehicleAir (array[HighscorePlayer],required) - player highscore for air vehicle
+ revive (array[HighscorePlayer],required) - player highscore for revive + revive (array[HighscorePlayer],required) - player highscore for revive
+ respawn (array[HighscorePlayer],required) - player highscore for respawn + respawn (array[HighscorePlayer],required) - player highscore for respawn
+ flagTouch (array[HighscorePlayer],required) - player highscore for flag captures + flagTouch (array[HighscorePlayer],required) - player highscore for flag captures

View File

@ -27,7 +27,7 @@ const LogVehicleKillSchema = new Schema({
}, },
vehicleClass: { vehicleClass: {
type: String, type: String,
enum: ['LIGHT', 'HEAVY', 'AIR', "UNKNOWN"], enum: ['LIGHT', 'HEAVY', 'AIR', 'UNKNOWN'],
required: true, required: true,
}, },
}, { }, {

View File

@ -5,10 +5,10 @@ const playerArrayContains = require('./util').playerArrayContains;
const WHITESPACE = ' '; const WHITESPACE = ' ';
const VehicleClasses = Object.freeze({ const VehicleClasses = Object.freeze({
LIGHT: "Leicht", LIGHT: 'Leicht',
HEAVY: "Schwer", HEAVY: 'Schwer',
AIR: "Flug", AIR: 'Flug',
UNKNOWN: "Unbekannt" UNKNOWN: 'Unbekannt',
}); });
const parseWarLog = (lineArray, war) => { const parseWarLog = (lineArray, war) => {
@ -316,10 +316,6 @@ const transformMoneyString = (budgetString) => {
}; };
const getFullTimeDate = (date, timeString) => { const getFullTimeDate = (date, timeString) => {
console.log(date)
console.log(timeString)
const returnDate = new Date(date); const returnDate = new Date(date);
const time = timeString.split(':'); const time = timeString.split(':');
returnDate.setHours(time[0]); returnDate.setHours(time[0]);