This commit is contained in:
王炜翔 2024-08-20 17:32:06 +08:00
parent fdcc288519
commit 87563c03d4

View File

@ -1,5 +1,9 @@
using Microsoft.AspNetCore.Authorization;
using Masuit.Tools;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using System.Security.Claims;
namespace asg_form.Controllers
{
@ -14,16 +18,20 @@ namespace asg_form.Controllers
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);
[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);
using (TestDbContext sb = new TestDbContext())
{
return Ok();
}
}
}
}