public IHttpActionResult Get([FromUri] ReqViewProject req) { var response = new ResViewProject(); var project = this._projectRepo.GetProjectDetail(req.projectID); response.setResponse(ResStatusCode.OK, project, 1); return(Ok(response)); }
public async Task <IHttpActionResult> Post(ReqModifyProject req) { var response = new ResViewProject(); var userClaimsInfoModel = this.GetUserModelFromCurrentClaimsIdentity(); var result = await _projectRepo.ModifyProject(req.projectID, req.projectName, req.projectSummary, req.avatarToken, userClaimsInfoModel.mail); if (!result) { Enforce.Throw(new LogicErrorException("项目更新失败")); } var project = this._projectRepo.GetProjectDetail(req.projectID); response.setResponse(ResStatusCode.OK, project, 1); return(Ok(response)); }