更新错误提示

This commit is contained in:
Sakurasan committed 2023-04-27 22:23:22 +08:00
1 parent 8a2ebb6778
commit d2f07a824e
2 files changed
+5 -2

No files matched your search

+3 -1
View File
@@ -358,7 +358,9 @@ func HandleProy(c *gin.Context) {
req.Header = c.Request.Header
if localuser {
if store.KeysCache.ItemCount() == 0 {
c.JSON(http.StatusOK, gin.H{"error": "No Api-Key Available"})
c.JSON(http.StatusBadGateway, gin.H{"error": gin.H{
"message": "No Api-Key Available",
}})
return
}
req.Header.Set("Authorization", fmt.Sprintf("Bearer %s", store.FromKeyCacheRandomItem()))