From 35fad3e16418568c3b977f472a3ab0a290d9e686 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E7=82=9C=E7=BF=94?= <2307953404@qq.com> Date: Fri, 30 Aug 2024 08:52:06 +0800 Subject: [PATCH] 222 --- asg_form/Controllers/AssignmentController.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/asg_form/Controllers/AssignmentController.cs b/asg_form/Controllers/AssignmentController.cs index 11542fa..069d62d 100644 --- a/asg_form/Controllers/AssignmentController.cs +++ b/asg_form/Controllers/AssignmentController.cs @@ -14,6 +14,7 @@ namespace asg_form.Controllers public class TaskDB { public long id { get; set; } + public string chinaname { get; set; } public long userId { get; set; } public string taskName { get; set; } public string taskDescription { get; set; } @@ -22,6 +23,7 @@ namespace asg_form.Controllers } public class TaskCreate { + public string Chinaname { get; set; } public long UserId { get; set; } public string TaskName { get; set; } public string TaskDescription { get; set; } @@ -50,6 +52,7 @@ namespace asg_form.Controllers { var task = new TaskDB { + chinaname = taskinfo.Chinaname, userId = taskinfo.UserId, taskName = taskinfo.TaskName, taskDescription = taskinfo.TaskDescription, @@ -86,7 +89,7 @@ namespace asg_form.Controllers } [Route("api/v1/Task")] - [HttpGet] + [HttpPost] [Authorize] public async Task> CekTask([FromBody] Click_done msg) { @@ -103,7 +106,7 @@ namespace asg_form.Controllers } [Route("api/v1/admin/Task/Done")] - [HttpGet] + [HttpPost] [Authorize] public async Task> FinishTask([FromBody] Click_done msg) { @@ -116,7 +119,7 @@ namespace asg_form.Controllers using (TestDbContext sub = new TestDbContext()) { var task = sub.T_Task.Find(msg.id); - task.status = "1"; + task.status = "2"; await sub.SaveChangesAsync(); return Ok(task); }