111
This commit is contained in:
parent
fdcc288519
commit
87563c03d4
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user