fix: admin database charset
This commit is contained in:
@@ -14,16 +14,24 @@ func okResponse(data string) *product.Response {
|
||||
}
|
||||
}
|
||||
|
||||
func failResponse(err utils.Error) *product.Response {
|
||||
func failResponse(status utils.Status) *product.Response {
|
||||
return &product.Response{
|
||||
Code: status.Code,
|
||||
Msg: status.Msg,
|
||||
}
|
||||
}
|
||||
|
||||
func outResponse(status utils.Status, msg string) *product.Response {
|
||||
return &product.Response{
|
||||
Code: status.Code,
|
||||
Msg: msg,
|
||||
}
|
||||
}
|
||||
|
||||
// failErr 兼容仍返回 utils.Error 的旧错误码
|
||||
func failErr(err utils.Error) *product.Response {
|
||||
return &product.Response{
|
||||
Code: int32(err.GetCode()),
|
||||
Msg: err.GetMsg(),
|
||||
}
|
||||
}
|
||||
|
||||
func msgResponse(code int32, msg string) *product.Response {
|
||||
return &product.Response{
|
||||
Code: code,
|
||||
Msg: msg,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user