Example #1
0
        public RESTRequestStatus Post(string appkey,
                                      string sessionid,
                                      string deviceToken,
                                      string platform,
                                      Int64 accountno
                                      )
        {
            RESTRequestStatus response = new RESTRequestStatus(RESTRequestStatusCode.unknown);

            if (AppController.ProceedWithRequest(response, appkey, sessionid, Request) == false)
            {
                return(response);
            }

            string fullpath = Request.Path;
            string op       = fullpath.Substring("/fluid/account/".Length, fullpath.Length - "/fluid/account/".Length);

            switch (op)
            {
            case Constants.device:
                if (DataLayer.AddDeviceToAccount(response, accountno, deviceToken, platform))
                {
                    response.statuscode = RESTRequestStatusCode.success;
                    response.status     = RESTRequestStatusCode.success.ToString( );
                }
                break;
            }

            return(response);
        }