🐛 Fix query statement column issue

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

10
.idea/workspace.xml generated
View File

@ -4,10 +4,8 @@
<option name="autoReloadType" value="ALL" />
</component>
<component name="ChangeListManager">
<list default="true" id="3fefb2c4-b6f9-466b-a523-53352e8d6f95" name="更改" comment=":bug: Fix preloading issue">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pkg/internal/server/api/bot_token_api.go" beforeDir="false" afterPath="$PROJECT_DIR$/pkg/internal/server/api/bot_token_api.go" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pkg/internal/server/api/index.go" beforeDir="false" afterPath="$PROJECT_DIR$/pkg/internal/server/api/index.go" afterDir="false" />
<list default="true" id="3fefb2c4-b6f9-466b-a523-53352e8d6f95" name="更改" comment=":bug: Fix bot related key api issue">
<change beforePath="$PROJECT_DIR$/pkg/internal/services/bot_token.go" beforeDir="false" afterPath="$PROJECT_DIR$/pkg/internal/services/bot_token.go" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -154,7 +152,6 @@
</option>
</component>
<component name="VcsManagerConfiguration">
<MESSAGE value=":recycle: Use dealer postman instead of built-in feature to deliver email and notify" />
<MESSAGE value=":bug: Fix push notification to wrong person" />
<MESSAGE value=":sparkles: Account groups" />
<MESSAGE value=":sparkles: Default user group" />
@ -179,7 +176,8 @@
<MESSAGE value=":bug: Fix api key missing account id" />
<MESSAGE value=":sparkles: Preload api key's ticket" />
<MESSAGE value=":bug: Fix preloading issue" />
<option name="LAST_COMMIT_MESSAGE" value=":bug: Fix preloading issue" />
<MESSAGE value=":bug: Fix bot related key api issue" />
<option name="LAST_COMMIT_MESSAGE" value=":bug: Fix bot related key api issue" />
</component>
<component name="VgoProject">
<settings-migrated>true</settings-migrated>

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
}