public async Task <ResponseMessage> CheckNameExists(string name) { try { var id = await _spliceClosureService.CheckNameExists(name); var msg = ""; if (id == null) { msg = "true"; } else { msg = "false"; } return(new ResponseMessage { Status = "Ok", Message = msg }); } catch (Exception ex) { _logger?.LogError(ex, "Error checking name."); return(new ResponseMessage { Status = "Error", Message = "Error checking name." }); } }
public async Task <ResponseMessage> CheckNameExists(string name) { try { var id = await _spliceClosureService.CheckNameExists(name); return(new ResponseMessage { Status = "Ok", Data = id }); } catch (Exception ex) { _logger?.LogError(ex, "Error checking name."); return(new ResponseMessage { Status = "Error", Message = "Error checking name." }); } }