public async Task <JsonResult> CheckCatApi(StringModel model) { if (model == null || string.IsNullOrWhiteSpace(model.Value)) { return(ToJsonResponse(false, "Dữ liệu không hợp lệ")); } var result = await _svMCredit.CheckCat(GlobalData.User.IDUser, model.Value); return(ToJsonResponse(result.status == "error" ? false : true, result.msg?.ToString(), result)); }
public async Task <CheckCatResponseModel> CheckCatAsync(StringModel model) { if (model == null || string.IsNullOrWhiteSpace(model.Value)) { return(ToResponse <CheckCatResponseModel>(null, Errors.invalid_data)); } var result = await _svMcredit.CheckCat(model.Value); if (!result.success) { return(ToResponse(result)); } return(result.data); }