fix active key,suffix

This commit is contained in:
Sakurasan
2025-04-20 16:22:23 +08:00
parent fe0f2a7e88
commit b83c6d9786
11 changed files with 106 additions and 119 deletions

View File

@@ -93,6 +93,7 @@ func (dao *ApiKeyDAO) FindApiKeysBySupportModel(db *gorm.DB, modelName string) (
}
err := db.Model(&model.ApiKey{}).
Joins("CROSS JOIN JSON_EACH(apikeys.support_models)").
Where("active = true").
Where("value = ?", modelName).
Find(&apiKeys).Error
return apiKeys, err