public async Task <object> BloquearPuerta([FromBody] ReaderPath_DTO pathReader)
        {
            try
            {
                object result = new
                {
                    sucess = await _reader_REP_LOCAL.BloquearPuerta(pathReader),
                    status = 200,
                    data   = "Done"
                };

                return(result);
            }
            catch (Exception ex)
            {
                object result = new
                {
                    sucess = false,
                    status = 400,
                    data   = ex.Message
                };

                return(BadRequest(result));
            }
        }
Esempio n. 2
0
 public async Task <object> BloquearPuerta([FromBody] ReaderPath_DTO pathReader)
 {
     try
     {
         return(await _reader_REP_LOCAL.BloquearPuerta(pathReader));
     }
     catch (Exception ex) { return(BadRequest(ex.Message)); }
 }