Return status 200 for unauthorized operation, revert commit: 2fd2d88d20

This commit is contained in:
Yang Luo 2024-03-08 15:11:25 +08:00
parent 976b5766a5
commit 0108b58db4

View File

@ -17,7 +17,6 @@ package routers
import (
"fmt"
"net"
"net/http"
"net/url"
"strings"
@ -36,7 +35,7 @@ type Response struct {
}
func responseError(ctx *context.Context, error string, data ...interface{}) {
ctx.ResponseWriter.WriteHeader(http.StatusForbidden)
// ctx.ResponseWriter.WriteHeader(http.StatusForbidden)
resp := Response{Status: "error", Msg: error}
switch len(data) {