fixed Add external user command

This commit is contained in:
Sarah Faey 2022-11-15 22:11:21 +01:00
parent a504925752
commit f40903851e
9 changed files with 122 additions and 39 deletions

View file

@ -35,10 +35,21 @@ namespace Lieb.Controllers
}
[HttpGet]
[Route("[action]/{raidId}/{userId}")]
public ActionResult IsSignUpAllowed(int raidId, ulong userId)
[Route("[action]/{raidId}/{userId}/{ignoreRole}")]
public ActionResult IsSignUpAllowed(int raidId, ulong userId, bool ignoreRole)
{
if(!_raidService.IsRaidSignUpAllowed(userId, raidId, out string errorMessage))
if(!_raidService.IsRaidSignUpAllowed(userId, raidId, out string errorMessage, ignoreRole))
{
return Problem(errorMessage);
}
return Ok();
}
[HttpGet]
[Route("[action]/{raidId}")]
public ActionResult IsExternalSignUpAllowed(int raidId)
{
if(!_raidService.IsExternalSignUpAllowed(raidId, out string errorMessage))
{
return Problem(errorMessage);
}