fix: season is a float

This commit is contained in:
Kalane 2021-09-14 15:06:42 +02:00
parent 00518e5143
commit 537a2eb183
2 changed files with 3 additions and 3 deletions

View file

@ -85,7 +85,7 @@ class MatchService {
): Promise<SerializedMatch[]> {
console.time('getMatches')
let matches: SerializedMatch[] = []
const matches: SerializedMatch[] = []
const matchesToGetFromRiot: MatchlistDto = []
for (let i = 0; i < matchIds.length; ++i) {
const matchSaved = await Match.query()
@ -112,7 +112,7 @@ class MatchService {
// TODO: Serialize match from DB + put it in Redis + push it in "matches"
const serializedMatches = BasicMatchSerializer.serialize(parsedMatches, puuid, true)
matches = [...matches, ...serializedMatches]
matches.push(...serializedMatches)
}
// Todo: check if we need to sort here

View file

@ -13,7 +13,7 @@ export default class Matches extends BaseSchema {
table.string('region', 4).notNullable()
table.integer('result').notNullable()
table.integer('season').notNullable()
table.float('season').notNullable()
table.integer('game_duration').notNullable()
// table.integer('blue_team_id').notNullable()