fixed issue with calculating dates, added api for posting a game to the server
This commit is contained in:
@@ -23,11 +23,18 @@ final class Match: Model, Content {
|
||||
var roundsLost: Int?
|
||||
|
||||
@Field(key: "codGame")
|
||||
var codGame: String
|
||||
var codGame: String?
|
||||
|
||||
@Field(key: "notes")
|
||||
var notes: String?
|
||||
|
||||
@Field(key: "players")
|
||||
var players: String?
|
||||
|
||||
|
||||
init() { }
|
||||
|
||||
init(id: UUID? = nil, map:String?, win:Bool, date:Date, roundsWon:Int?, roundsLost:Int?, codGame:String) {
|
||||
init(id: UUID? = nil, map:String?, win:Bool, date:Date, roundsWon:Int?, roundsLost:Int?, codGame:String?, notes:String?, players:String?) {
|
||||
self.id = id
|
||||
self.map = map
|
||||
self.win = win
|
||||
@@ -35,6 +42,8 @@ final class Match: Model, Content {
|
||||
self.roundsWon = roundsWon
|
||||
self.roundsLost = roundsLost
|
||||
self.codGame = codGame;
|
||||
self.notes = notes;
|
||||
self.players = players
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user