Пример #1
0
        // POST api/values
        public void Post([FromBody] Request request)
        {
            switch (request.Type)
            {
            case "whatido":
                WhatIDoAdder.AddWhatIDo(
                    request.MisparIshi, request.Data);
                return;

            case "deletetag":
                TagAdder.DeleteTagForPerson(request.MisparIshi, request.Data);
                return;
            }
        }
Пример #2
0
        // POST api/values
        public void Post([FromBody] Request request)
        {
            switch (request.Type)
            {
            case PersonalFieldAdder.WHAT_I_DO:
            case PersonalFieldAdder.ADD_MOBILE:
            case PersonalFieldAdder.ADD_WORK_NUMBER:
            case PersonalFieldAdder.ADD_OTHER_NUMBER:
            case PersonalFieldAdder.SEX:
                PersonalFieldAdder.AddPersonalField(
                    request.MisparIshi, request.Data, request.Type);
                return;

            case "log":
                Logger.Log(request.Logs);
                return;

            case "deletetag":
                TagAdder.DeleteTagForPerson(request.MisparIshi, request.Data);
                return;

            case "reportoddity":     // It's an oddity. We don't write bugs.
                BugReporter.ReportBug(request.Data);
                return;

            case "addadmin":
                AdminAdder.AddAdmin(request.MisparIshi, request.IsSuperAdmin);
                return;

            case "deleteadmin":
                AdminAdder.DeleteAdmin(request.MisparIshi);
                return;

            case "admindeletetag":
                AdminTagDeleter.DeleteTag(request.Data);
                return;
            }
        }