feat 网关鉴权
This commit is contained in:
@@ -20,7 +20,7 @@ func NewWrappedMarshaler(inner runtime.Marshaler) *WrappedMarshaler {
|
||||
func (w *WrappedMarshaler) Marshal(v interface{}) ([]byte, error) {
|
||||
dataBytes, err := w.inner.Marshal(v)
|
||||
if err != nil {
|
||||
return json.Marshal(http_resp.Error(http_resp.Failed.Code(), http_resp.Failed.Error()))
|
||||
return json.Marshal(http_resp.Error(http_resp.Failed))
|
||||
}
|
||||
return json.Marshal(http_resp.Success(json.RawMessage(dataBytes)))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user