public ActionResult <bool> leaveCategorie([FromQuery] CategorieJoiningDto categorieJoiningDto) { if (categorieJoiningDto.userId != int.Parse((User.FindFirst(ClaimTypes.NameIdentifier).Value))) { return(Unauthorized()); } return(_db.leaveCategorie(categorieJoiningDto.userId, categorieJoiningDto.categorieId)); }
public async Task <ActionResult <bool> > joinCategorie(CategorieJoiningDto categorieJoiningDto) { if (categorieJoiningDto.userId != int.Parse((User.FindFirst(ClaimTypes.NameIdentifier).Value))) { return(Unauthorized()); } return(await _db.joinCategorie(categorieJoiningDto.userId, categorieJoiningDto.categorieId)); }
public ActionResult <bool> isUserJoindToCategorie([FromQuery] CategorieJoiningDto categorieJoiningDto) { return(_db.isUserJoindToCategorie(categorieJoiningDto.userId, categorieJoiningDto.categorieId)); }