示例#1
0
 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));
 }
示例#2
0
 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));
 }
示例#3
0
 public ActionResult <bool> isUserJoindToCategorie([FromQuery] CategorieJoiningDto categorieJoiningDto)
 {
     return(_db.isUserJoindToCategorie(categorieJoiningDto.userId, categorieJoiningDto.categorieId));
 }