public IHttpActionResult SaveDriverGcmToken(Gtoken model)
 {
     try
     {
         if (!ModelState.IsValid)
         {
             return(Json(_responseProvider.GenerateBadRequestResponse(ModelState)));
         }
         _userManager.InsertGoogleToken(int.Parse(User.Identity.GetUserId()), model, UserRoles.MobileDriver);
         return(Json(_responseProvider.GenerateOKResponse()));
     }
     catch (Exception e)
     {
         _logmanager.Log(Tag, "SaveDriverGcmToken", e.Message);
     }
     return(Json(_responseProvider.GenerateUnknownErrorResponse()));
 }
Example #2
0
 public IHttpActionResult RegisterUserbyNickName(string nickname)
 {
     try
     {
         _userManager.RegisterFanap(nickname);
         return(Json(_responseProvider.GenerateOKResponse()));
     }
     catch (Exception e)
     {
         _logmanager.Log(Tag, "RegisterUserbyNickName", e.Message);
     }
     return(Json(_responseProvider.GenerateUnknownErrorResponse()));
 }
Example #3
0
 public IHttpActionResult InsertUserEventRoute(RouteEventModel model)
 {
     try
     {
         if (!ModelState.IsValid)
         {
             return(Json(_responseProvider.GenerateBadRequestResponse(ModelState)));
         }
         _routemanager.InsertUserEventRoute(model, int.Parse(User.Identity.GetUserId()));
         ResponseModel responseModel = _responseProvider.GenerateOKResponse();
         return(Json(responseModel));
     }
     catch (Exception e)
     {
         _logmanager.Log(Tag, "InsertUserEventRoute", e.Message);
     }
     return(Json(_responseProvider.GenerateUnknownErrorResponse()));
 }