public IActionResult FetchContacts(int userId) { _logger.LogInformation($"[Phonebook Controller] Received Fetch Contacts request, userId:{userId}"); var PhoneEntries = _phoneService.GetPhoneEntries(userId); return(Ok(PhoneEntries)); }
public PhoneEntriesDTO GetPhoneEntries(int userId) { try { return(_phoneService.GetPhoneEntries(userId)); } catch (Exception ex) { _logger.LogError($"Exception occurred while fetching contacts. userId: {userId}, stackTrace: {ex.ToString()}"); throw ex; } }
public PhoneEntriesDTO GetPhoneEntries(int userId) { return(_phoneService.GetPhoneEntries(userId)); }