Move sessions to db table instead of JWTs
This commit is contained in:
@@ -88,7 +88,7 @@ final class Player: Model, @unchecked Sendable {
|
||||
account: Account,
|
||||
tutorialStep: Int?,
|
||||
tutorialSkipFlag: Int?
|
||||
) {
|
||||
) throws {
|
||||
self.stamina = stamina
|
||||
self.staminaHealTime = staminaHealTime
|
||||
self.boostPoint = boostPoint
|
||||
@@ -114,10 +114,12 @@ final class Player: Model, @unchecked Sendable {
|
||||
self.enableAuto3x = enableAuto3x
|
||||
self.tutorialStep = tutorialStep
|
||||
self.tutorialSkipFlag = tutorialSkipFlag
|
||||
|
||||
self.$account.id = try account.requireID()
|
||||
}
|
||||
|
||||
static func createDefault(account: Account) -> Player {
|
||||
return Player(
|
||||
static func createDefault(account: Account) throws -> Player {
|
||||
return try Player(
|
||||
stamina: 20,
|
||||
staminaHealTime: Date.now,
|
||||
boostPoint: 3,
|
||||
|
Reference in New Issue
Block a user