public async Task <IActionResult> Add([FromBody] UserDeviceVM ClientBrowser)
 {
     try
     {
         var ret = new CustomResponse();
         var res = this.notif.add(ClientBrowser.Key, ClientBrowser.Nik, ClientBrowser.Browser, ClientBrowser.Device, ClientBrowser.Os);
         if (res > 0)
         {
             ret.message = "";
             ret.ok      = true;
             ret.data    = null;
             ret.title   = "Pendaftaran Browser Key Sukses";
             //this.notif.sendNotif(ClientBrowser.Nik, "General Approval", "Terima kasih telah subscribe");
             return(Ok(ret));
         }
         else
         {
             ret.message = "";
             ret.ok      = false;
             ret.data    = null;
             ret.title   = "Pendaftaran Browser Key Gagal";
             return(BadRequest(ret));
         }
     }catch (Exception ex)
     {
         var res = new CustomResponse()
         {
             errors = new List <string>()
             {
                 ex.InnerException.Message
             },
             message = ex.Message,
             title   = "Error",
             ok      = false
         };
         return(BadRequest(res));
     }
 }
Ejemplo n.º 2
0
 public override BussinessCustomResponse <UserDeviceVM> Update(UserDeviceVM entityToUpdateVM)
 {
     return(base.Update(entityToUpdateVM));
 }
Ejemplo n.º 3
0
        public async Task <IActionResult> Logout([FromBody] UserDeviceVM ClientBrowser)
        {
            var fal = this.notif.remove(ClientBrowser.Nik, ClientBrowser.Browser, ClientBrowser.Device, ClientBrowser.Os);

            return(Ok());
        }