mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-19 16:29:01 +08:00
solve error
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
package apiresp
|
||||
|
||||
type ApiResponse struct {
|
||||
type apiResponse struct {
|
||||
ErrCode int `json:"errCode"`
|
||||
ErrMsg string `json:"errMsg"`
|
||||
ErrDlt string `json:"errDlt"`
|
||||
Data any `json:"data"`
|
||||
}
|
||||
|
||||
func apiSuccess(data any) *ApiResponse {
|
||||
return &ApiResponse{
|
||||
func apiSuccess(data any) *apiResponse {
|
||||
return &apiResponse{
|
||||
Data: data,
|
||||
}
|
||||
}
|
||||
|
||||
func apiError(err error) *ApiResponse {
|
||||
return &ApiResponse{ErrCode: 10000, ErrMsg: err.Error()}
|
||||
func apiError(err error) *apiResponse {
|
||||
return &apiResponse{ErrCode: 10000, ErrMsg: err.Error()}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user