コード例 #1
0
        public IActionResult DeleteReview([FromRoute] String eventId, [FromHeader(Name = "Authorization")] String userToken)
        {
            MongoUtil.DeleteReview(new ObjectId(JwtUtil.GetUserIdFromToken(userToken)),
                                   new ObjectId(eventId));

            return(Ok());
        }
コード例 #2
0
        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));
        }