Exemple #1
0
        public ActionResult <IEnumerable <string> > GetAllParticipants(LoginPost loginPost)
        {
            if (!auth.CheckIfDebugPermissions(loginPost))
            {
                return(Unauthorized());
            }

            return(Content(model.GetParticipants(), "application/json"));
        }
        public ActionResult <IEnumerable <string> > GetAllCodes(LoginPost loginPost)
        {
            if (!auth.CheckIfDebugPermissions(loginPost))
            {
                return(Unauthorized());
            }

            var result = model.GetAllCodes();

            return(Content(result, "application/json"));
        }
        public ActionResult <IEnumerable <string> > WipeUnnecessaryData(LoginPost loginPost)
        {
            if (!auth.CheckIfDebugPermissions(loginPost))
            {
                return(Unauthorized());
            }

            model.WipeUnnecessaryData();

            return(Ok());
        }
        public ActionResult <IEnumerable <string> > GetAllUsers(LoginPost loginPost)
        {
            if (!auth.CheckIfDebugPermissions(loginPost))
            {
                return(Unauthorized());
            }

            var query = Request.QueryString.ToUriComponent();

            query = System.Web.HttpUtility.UrlDecode(query);
            var result = model.GetUsers(query);

            return(Content(result, "application/json"));
        }
        public ActionResult <IEnumerable <string> > ProcessBookings(LoginPost loginPost, string eventUid)
        {
            if (!auth.CheckIfDebugPermissions(loginPost))
            {
                return(Unauthorized());
            }

            if (new VeranstaltungenModel().GetCalendarId(eventUid) == -1)
            {
                return(NotFound());
            }

            model.ProcessBookings(eventUid);
            return(Ok());
        }