test: updated test cases

This commit is contained in:
Marvin Zhang
2024-10-20 17:55:57 +08:00
parent b5e888f3e1
commit cecf4dfd1d
20 changed files with 79 additions and 321 deletions

View File

@@ -38,16 +38,3 @@ func HandleSuccessWithData(data interface{}) (res *grpc.Response, err error) {
Data: bytes,
}, nil
}
func HandleSuccessWithListData(data interface{}, total int) (res *grpc.Response, err error) {
bytes, err := json.Marshal(data)
if err != nil {
return HandleError(err)
}
return &grpc.Response{
Code: grpc.ResponseCode_OK,
Message: "success",
Data: bytes,
Total: int64(total),
}, nil
}