mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-02-18 20:30:51 +08:00
fix: restore get-auth-status ok fallback and document it
This commit is contained in:
@@ -2182,7 +2182,7 @@ func checkCloudAPIIsEnabled(ctx context.Context, httpClient *http.Client, projec
|
|||||||
func (h *Handler) GetAuthStatus(c *gin.Context) {
|
func (h *Handler) GetAuthStatus(c *gin.Context) {
|
||||||
state := strings.TrimSpace(c.Query("state"))
|
state := strings.TrimSpace(c.Query("state"))
|
||||||
if state == "" {
|
if state == "" {
|
||||||
c.JSON(http.StatusBadRequest, gin.H{"status": "error", "error": "state is required"})
|
c.JSON(http.StatusOK, gin.H{"status": "ok"})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if err := ValidateOAuthState(state); err != nil {
|
if err := ValidateOAuthState(state); err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user