merge upstream

Signed-off-by: wozulong <>
This commit is contained in:
wozulong
2024-05-31 11:14:25 +08:00
32 changed files with 4523 additions and 369 deletions

View File

@@ -36,7 +36,7 @@ const (
)
func GetLogByKey(key string) (logs []*Log, err error) {
err = DB.Joins("left join tokens on tokens.id = logs.token_id").Where("tokens.key = ?", strings.Split(key, "-")[1]).Find(&logs).Error
err = DB.Joins("left join tokens on tokens.id = logs.token_id").Where("tokens.key = ?", strings.TrimPrefix(key, "sk-")).Find(&logs).Error
return logs, err
}