Пример #1
0
        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));
        }
Пример #2
0
        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));
        }