diff --git a/src/api/.air.toml b/src/api/.air.toml index 49468ed..498951f 100644 --- a/src/api/.air.toml +++ b/src/api/.air.toml @@ -36,11 +36,17 @@ tmp_dir = "tmp" [log] main_only = false + silent = false time = false [misc] clean_on_exit = false +[proxy] + app_port = 0 + enabled = false + proxy_port = 0 + [screen] clear_on_rebuild = false keep_scroll = true diff --git a/src/model/api_key.go b/src/model/api_key.go index 48d4740..cd3579c 100644 --- a/src/model/api_key.go +++ b/src/model/api_key.go @@ -24,9 +24,13 @@ func GetApiKeys() ([]ApiKey, error) { } func GetApiKey(apiKeyStr string) (ApiKey, error) { + logger := logging.GetLogger() var apiKey ApiKey db := database.GetDbConnection() - err := db.First(&apiKey).Where("key = ?", apiKeyStr).Error + err := db.Where("key = ?", apiKeyStr).First(&apiKey).Error + if err != nil { + logger.Debug("API key is invalid. ", apiKeyStr) + } return apiKey, err }