feat: NCS-82 add Swiss-system tournament module #55
@@ -76,6 +76,6 @@ class OfficialBotAccount extends PanacheEntityBase:
|
|||||||
|
|
||||||
var createdAt: Instant = uninitialized
|
var createdAt: Instant = uninitialized
|
||||||
|
|
||||||
@Column(nullable = false, length = 1024)
|
@Column(length = 1024)
|
||||||
var token: String = uninitialized
|
var token: String = uninitialized
|
||||||
// scalafix:on
|
// scalafix:on
|
||||||
|
|||||||
@@ -205,7 +205,8 @@ class AccountService:
|
|||||||
bot.name = botName
|
bot.name = botName
|
||||||
bot.createdAt = Instant.now()
|
bot.createdAt = Instant.now()
|
||||||
officialBotAccountRepository.persist(bot)
|
officialBotAccountRepository.persist(bot)
|
||||||
bot.token = generateBotToken(bot.id, botName)
|
bot.token = generateBotToken(bot.id, bot.name)
|
||||||
|
officialBotAccountRepository.persist(bot)
|
||||||
Right(bot)
|
Right(bot)
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
@@ -216,7 +217,8 @@ class AccountService:
|
|||||||
bot.name = name
|
bot.name = name
|
||||||
bot.createdAt = Instant.now()
|
bot.createdAt = Instant.now()
|
||||||
officialBotAccountRepository.persist(bot)
|
officialBotAccountRepository.persist(bot)
|
||||||
bot.token = generateBotToken(bot.id, name)
|
bot.token = generateBotToken(bot.id, bot.name)
|
||||||
|
officialBotAccountRepository.persist(bot)
|
||||||
log.infof("Auto-registered official bot: %s", name)
|
log.infof("Auto-registered official bot: %s", name)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user