@ -12,7 +12,6 @@ func Error(w http.ResponseWriter, err error) {
}
func Ok(w http.ResponseWriter) {
w.Header().Set("Content-Type", "text/plain; charset=utf-8")
w.WriteHeader(http.StatusOK)
@ -71,7 +71,7 @@ func genHandler(dir string, group spec.Group, route spec.Route) error {
if len(route.RequestType.Name) == 0 {
req = ""
var logicResponse = ""
var logicResponse string
var writeResponse = "nil, nil"
var respWriter = `httpx.WriteJson(w, http.StatusOK, resp)`
if len(route.ResponseType.Name) > 0 {
@ -77,11 +77,11 @@ func genRoutes(dir string, api *spec.ApiSpec) error {
},`,
r.method, r.path, r.handler)
jwt := ""
var jwt string
if g.jwtEnabled {
jwt = fmt.Sprintf(", ngin.WithJwt(serverCtx.Config.%s.AccessSecret)", g.authName)
signature := ""
var signature string
if g.signatureEnabled {
signature = fmt.Sprintf(", ngin.WithSignature(serverCtx.Config.%s.Signature)", g.authName)