This commit is contained in:
王炜翔 2024-10-09 13:39:44 +08:00
parent 1b36a5d102
commit 0f6d03d16b

View File

@ -214,8 +214,22 @@ namespace asg_form.Controllers
public string createTime { get; set; }
}
[Route("api/v1/admin/refuseCom")]
[HttpGet]
[Authorize]
public async Task<ActionResult<string>> refuse_com(int userId)
{
if (this.User.FindAll(ClaimTypes.Role).Any(a => a.Value == "admin"))
{
using (TestDbContext testDb = new TestDbContext())
{
}
}
return Ok(new error_mb { code = 401, message = "没有管理员,无法设置" });
}
}
}
}