diff --git a/asg_form/Controllers/Teamregistration/RegisterController.cs b/asg_form/Controllers/Teamregistration/RegisterController.cs index d5718cd..87ca0aa 100644 --- a/asg_form/Controllers/Teamregistration/RegisterController.cs +++ b/asg_form/Controllers/Teamregistration/RegisterController.cs @@ -10,7 +10,7 @@ namespace asg_form.Controllers.Teamregistration { public class ComformDB { - public long id { get; set; } + public int? id { get; set; } public string chinaname { get; set; } public int user_id { get; set; } public int sex { get; set; } @@ -26,7 +26,7 @@ namespace asg_form.Controllers.Teamregistration } public class userMsg { - public long id { get; set; } + public string chinaname { get; set; } public int userId { get; set; } public int sex { get; set; } @@ -34,7 +34,7 @@ namespace asg_form.Controllers.Teamregistration public string gameId { get; set; } public string? historyRank { get; set; } public string? contactNumber { get; set; } - + public int? id { get; set; } } public class RegisterController : ControllerBase { @@ -51,11 +51,7 @@ namespace asg_form.Controllers.Teamregistration [HttpPost] [Authorize] public async Task> UserRgst([FromBody] userMsg msg) - { - if (msg == null) - { - return Ok(new error_mb { code = 400, message = "请求内容为空" }); - } + { using (TestDbContext sub = new TestDbContext()) { @@ -215,10 +211,10 @@ namespace asg_form.Controllers.Teamregistration if (result.Count == 0) { - return new JsonResult(new { }); + return (new { }); } - return new JsonResult(result); + return (result); } } }