mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-30 18:00:56 +01:00
test: updated test cases
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user