This commit is contained in:
王炜翔 2024-08-20 17:20:58 +08:00
parent 578384c006
commit fdcc288519

View File

@ -1,7 +1,29 @@
namespace asg_form.Controllers
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
namespace asg_form.Controllers
{
public class InviteReferee
public class InviteReferee : ControllerBase
{
private readonly RoleManager<Role> roleManager;
private readonly UserManager<User> userManager;
public InviteReferee(
RoleManager<Role> roleManager, UserManager<User> userManager)
{
this.roleManager = roleManager;
this.userManager = userManager;
}
}
[Route("api/v1/Invite")]
[HttpGet]
[Authorize]
public async Task<ActionResult<object>> GetReferee([FromBody] long Inviteeid)
{
string Invitorid = this.User.FindFirst(ClaimTypes.NameIdentifier)!.Value;
var user = await userManager.FindByIdAsync(Invitorid);
}
}