Beispiel #1
0
        // PUT api/values/5
        public Dictionary <String, Boolean> Put([FromBody] string guid)
        {
            Dictionary <String, Boolean> result = this.GetSimpleSuccessResponse();

            try
            {
                UpdateUserMessage msg = new UpdateUserMessage();
                msg.guid = guid;
                msg.EnqueueSelfAsMessage(BaseApiController.protectedQueue);
            }
            catch (Exception e)
            {
                result["success"] = false;
                // we should be logging these
            }
            return(result);
        }
Beispiel #2
0
        // GET api/update

        /*
         * public IEnumerable<string> Get()
         * {
         *  return new string[] { "value1", "value2" };
         * }
         *
         * // GET api/values/5
         * public string Get(int id)
         * {
         *  return "value";
         * }
         */
        // PUT api/updateuser
        public Dictionary <String, String> Post(Dictionary <String, dynamic> dict)
        {
            Dictionary <String, String> result = new Dictionary <String, String>();

            try
            {
                UpdateUserMessage msg = new UpdateUserMessage();
                msg.guid = dict["guid"];
                msg.EnqueueSelfAsMessage(BaseApiController.protectedQueue);
                result["success"] = "true";
            }
            catch (Exception e)
            {
                result["success"] = "false";
                // We should be logging these
            }
            return(result);
        }