public IActionResult DeleteReview([FromRoute] String eventId, [FromHeader(Name = "Authorization")] String userToken) { MongoUtil.DeleteReview(new ObjectId(JwtUtil.GetUserIdFromToken(userToken)), new ObjectId(eventId)); return(Ok()); }
public IActionResult UnregisterUserToEvent([FromRoute] string eventId, [FromHeader(Name = "Authorization")] string token) { ObjectId userId = new ObjectId(JwtUtil.GetUserIdFromToken(token)); Boolean ok = MongoUtil.UnregisterUserFromEvent(new ObjectId(eventId), userId); MongoUtil.DeleteReview(userId, new ObjectId(eventId)); return(Ok(ok)); }