mirror of
https://github.com/allinssl/allinssl.git
synced 2025-12-18 10:04:01 +08:00
api测试
This commit is contained in:
@@ -133,6 +133,9 @@ func checkApiKey(c *gin.Context) bool {
|
||||
c.JSON(http.StatusBadRequest, gin.H{"error": "invalid request"})
|
||||
return false
|
||||
}
|
||||
if form.ApiToken == "" || form.Timestamp == "" {
|
||||
return false
|
||||
}
|
||||
apiKey := public.GetSettingIgnoreError("api_key")
|
||||
if apiKey == "" {
|
||||
c.JSON(http.StatusBadRequest, gin.H{"error": "未开启api"})
|
||||
|
||||
Reference in New Issue
Block a user