public IHttpActionResult DeleteTimeSheetTask([FromBody] ReqDeleteTimeSheetTask req) { var response = new ResponseBaseModel(); var currentInfo = this.GetUserModelFromCurrentClaimsIdentity(); this._timeSheetRepo.DeleteTimeSheetTask(req.taskID, currentInfo.mail); response.SetResponse(ResStatusCode.OK, "删除成功"); return(Ok(response)); }
public IHttpActionResult ExitTeam(ReqExitTeam req) { var response = new ResponseBaseModel(); var userClaimsInfoModel = this.GetUserModelFromCurrentClaimsIdentity(); this._teamRepo.ExitTeam(req.teamID, userClaimsInfoModel.mail); response.SetResponse(ResStatusCode.OK, "退出团队成功"); return(Ok(response)); }
public IHttpActionResult ExitProject(ReqExitProject req) { var response = new ResponseBaseModel(); var userClaimsInfoModel = this.GetUserModelFromCurrentClaimsIdentity(); this._projectRepo.ExitProject(req.projectID, userClaimsInfoModel.mail); response.SetResponse(ResStatusCode.OK, "退出项目成功"); return(Ok(response)); }
public IHttpActionResult RemoveMember(ReqRemoveMember req) { var response = new ResponseBaseModel(); var userClaimsInfoModel = this.GetUserModelFromCurrentClaimsIdentity(); this._projectRepo.RemoveProjectMember(req.projectID, req.mail, userClaimsInfoModel.mail); response.SetResponse(ResStatusCode.OK, "移除成功"); return(Ok(response)); }
public IHttpActionResult DeleteSprint(ReqDeleteSprint req) { var response = new ResponseBaseModel(); this._scrumRepository.DeleteSprint(req.teamID, req.sprintID); response.SetResponse(ResStatusCode.OK, "Sprint删除成功"); return(Ok(response)); }
public IHttpActionResult ChangePassword(ReqChangePassword req) { var response = new ResponseBaseModel(); if (!this._userRepo.ChangePassword(req.mail, req.oldPassword, req.newPassword)) { Enforce.Throw(new LogicErrorException("修改失败")); } response.SetResponse(ResStatusCode.OK, "修改成功"); return(Ok(response)); }
public IHttpActionResult Delete([FromBody] ReqDeleteBacklog req) { var response = new ResponseBaseModel(); if (!this._backlogRepository.DeleteBacklog(req.teamID, req.backlogID)) { Enforce.Throw(new LogicErrorException("删除失败")); } response.SetResponse(ResStatusCode.OK, "删除成功"); return(Ok(response)); }
public IHttpActionResult SetBacklogSprint(ReqSetBacklogSprint req) { var response = new ResponseBaseModel(); if (!this._backlogRepository.SetBackLogsSprint(req.teamID, req.sprintID, req.backlogIDs)) { Enforce.Throw(new LogicErrorException("设置失败")); } response.SetResponse(ResStatusCode.OK, "设置成功"); return(Ok(response)); }
public IHttpActionResult ChangeMemberRole(ReqChangeMemberRole req) { var response = new ResponseBaseModel(); var result = this._projectRepo.ChangeMemberRole(req.projectID, req.mail, req.roleCode); if (!result) { Enforce.Throw(new LogicErrorException("修改失败")); } response.SetResponse(ResStatusCode.OK, "修改成功"); return(Ok(response)); }
public IHttpActionResult ModifyTimeSheetTask([FromBody] ReqModifyTimeSheetTask req) { var response = new ResponseBaseModel(); var currentInfo = this.GetUserModelFromCurrentClaimsIdentity(); if (!this._timeSheetRepo.ModifyTimeSheetTask(req.taskID, req.detail, req.selectProjectID, req.time, currentInfo.mail)) { Enforce.Throw(new LogicErrorException("更改失败")); } response.SetResponse(ResStatusCode.OK, "更改成功"); return(Ok(response)); }
public IHttpActionResult Delete(ReqDeleteProject req) { var response = new ResponseBaseModel(); var result = _projectRepo.DeleteProject(req.projectID); if (!result) { Enforce.Throw(new LogicErrorException("项目删除失败")); } response.SetResponse(ResStatusCode.OK, "项目删除成功"); return(Ok(response)); }
public IHttpActionResult Delete(ReqDeleteTeam req) { var response = new ResponseBaseModel(); var result = _teamRepo.DeleteTeam(req.teamID); if (!result) { Enforce.Throw(new LogicErrorException("团队删除失败")); } response.SetResponse(ResStatusCode.OK, "团队删除成功"); return(Ok(response)); }
public IHttpActionResult VerifyEmail(string mail) { var response = new ResponseBaseModel(); var ret = _userRepo.VerifyEmail(mail); if (!ret) { Enforce.Throw(new LogicErrorException("当前邮箱已被注册")); } response.SetResponse(ResStatusCode.OK, "不存在"); return(Ok(response)); }
public async Task <IHttpActionResult> ModifyMyUserInfo([FromBody] ReqModifyMyUserInfo req) { var response = new ResponseBaseModel(); UserClaimsInfoModel userClaimsInfoModel = this.GetUserModelFromCurrentClaimsIdentity(); if (!await this._userRepo.ModifyMyUserInfo(userClaimsInfoModel.mail, req.userName, req.avatarToken, req.mobile)) { Enforce.Throw(new LogicErrorException("修改失败")); } response.SetResponse(ResStatusCode.OK, "修改成功"); return(Ok(response)); }
public IHttpActionResult DeleteRelease(ReqDeleteRelease req) { var response = new ResponseBaseModel(); var ret = this._scrumRepository.DeleteRelease(req.teamID, req.releaseID); if (!ret) { Enforce.Throw(new LogicErrorException("Release删除失败")); } response.SetResponse(ResStatusCode.OK, "Release删除成功"); return(Ok(response)); }
public IHttpActionResult ChangeMemberTags(ReqChangeMemberTags req) { var response = new ResponseBaseModel(); var userClaimsInfoModel = this.GetUserModelFromCurrentClaimsIdentity(); var result = this._projectRepo.ChangeMemberTags(req.projectID, userClaimsInfoModel.mail, req.mail, req.tags); if (!result) { Enforce.Throw(new LogicErrorException("修改失败")); } response.SetResponse(ResStatusCode.OK, "修改成功"); return(Ok(response)); }
public IHttpActionResult TransformProject(ReqTransformProject req) { var response = new ResponseBaseModel(); var userClaimsInfoModel = this.GetUserModelFromCurrentClaimsIdentity(); var result = this._projectRepo.TransformProject(req.projectID, userClaimsInfoModel.mail, req.mail); if (!result) { Enforce.Throw(new LogicErrorException("转交失败")); } response.SetResponse(ResStatusCode.OK, "转交成功"); return(Ok(response)); }
public IHttpActionResult ApproveTimeSheet([FromBody] ReqApproveTimeSheet req) { var response = new ResponseBaseModel(); var currentInfo = this.GetUserModelFromCurrentClaimsIdentity(); var ret = this._timeSheetRepo.ApproveTimeSheet(req.sheetID, (TimeSheetResultStatus)req.result, req.comment, req.viewTimeStamp, currentInfo.mail); if (!ret) { Enforce.Throw(new LogicErrorException("审核失败")); } response.SetResponse(ResStatusCode.OK, "审核成功"); return(Ok(response)); }
public IHttpActionResult SubmitTimeSheet([FromBody] ReqSubmitTimeSheet req) { var response = new ResponseBaseModel(); var currentInfo = this.GetUserModelFromCurrentClaimsIdentity(); var ret = this._timeSheetRepo.SubmitTimeSheet(req.sheetID, currentInfo.mail); if (!ret) { Enforce.Throw(new LogicErrorException("提交失败")); } response.SetResponse(ResStatusCode.OK, "提交成功"); return(Ok(response)); }
public async Task <IHttpActionResult> ResetPassword(ReqResetPassword req) { string agent = Request.Headers.UserAgent.ToString(); var response = new ResponseBaseModel(); if (!await this._userRepo.ResetPassword(req.submitToken, req.mail, req.password, agent)) { Enforce.Throw(new LogicErrorException("重置失败")); } response.SetResponse(ResStatusCode.OK, "重置成功"); return(Ok(response)); }
public IHttpActionResult EditSprint(ReqEditSprint req) { var response = new ResponseBaseModel(); var ret = this._scrumRepository.EditSprint(req.teamID, req.sprintID, DateTime.Parse(req.startTime), DateTime.Parse(req.endTime)); if (!ret) { Enforce.Throw(new LogicErrorException("Sprint修改失败")); } response.SetResponse(ResStatusCode.OK, "Sprint修改成功"); return(Ok(response)); }
public IHttpActionResult SetCurrentSprint(ReqSetCurrentSprint req) { var response = new ResponseBaseModel(); UserClaimsInfoModel userClaimsInfoModel = this.GetUserModelFromCurrentClaimsIdentity(); var ret = this._scrumRepository.SetCurrentSprint(req.teamID, req.sprintID); if (!ret) { Enforce.Throw(new LogicErrorException("Sprint设置失败")); } response.SetResponse(ResStatusCode.OK, "Sprint设置成功"); return(Ok(response)); }