This commit is contained in:
王炜翔 2024-09-16 22:05:54 +08:00
parent f620d13e86
commit 566aaba27b

View File

@ -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<ActionResult<object>> 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);
}
}
}