public Result Post([FromBody] GetReq req) { if (!req.validate()) { return(Result.failResult("格式有误", null)); } var res = _service.findParties(req.game, req.type, req.aim, req.page); return(Result.successResult("OK", res)); }
public IActionResult GetAllCategory([FromBody] GetReq req) { try { var Cates = _svc.GetCategory(req.Keyword, req.Page, req.Size); if (!(Cates.Data is null)) { return(Ok(Cates)); } return(NotFound()); } catch (Exception) { return(StatusCode(StatusCodes.Status500InternalServerError, "Error retrieving data from database")); } }