11
This commit is contained in:
parent
1b36a5d102
commit
0f6d03d16b
@ -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 = "没有管理员,无法设置" });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user