🐛 Fix query statement column issue

This commit is contained in:
2024-08-26 00:53:13 +08:00
parent d205a41614
commit f240226563
2 changed files with 5 additions and 7 deletions

View File

@ -41,7 +41,7 @@ func NewApiKey(user models.Account, key models.ApiKey, ip, ua string, claims []s
func RollApiKey(key models.ApiKey) (models.ApiKey, error) {
var ticket models.AuthTicket
if err := database.C.Where("ticket_id = ?", key.TicketID).First(&ticket).Error; err != nil {
if err := database.C.Where("id = ?", key.TicketID).First(&ticket).Error; err != nil {
return key, err
}