Esempio n. 1
0
        public ActionResult <IEnumerable <string> > DeleteParticipant(LoginPost loginPost, string eventUid, long participationId)
        {
            var v       = new VeranstaltungenModel();
            var calId   = v.GetCalendarId(eventUid);
            var eventId = new BuchungenModel().GetEventId(eventUid);

            if (calId == -1)
            {
                return(NotFound());
            }

            if (!auth.CheckIfCalendarPermissions(loginPost, calId))
            {
                return(Unauthorized());
            }

            if (model.DeleteParticipant(new Dictionary <string, string> {
                { "veranstaltung", eventId }, { "nutzer", participationId.ToString() }
            }))
            {
                return(Ok());
            }
            else
            {
                return(NotFound());
            }
        }
 public BuchungenController()
 {
     model = new BuchungenModel();
     auth  = new AuthModel();
 }