public async Task <string> DeleteAsync(int id, int userId) { if (!_listsRepository.UserOwns(id, userId)) { throw new ValidationException("Unauthorized"); } return(await _listsRepository.DeleteAsync(id)); }
public async Task <string> DeleteAsync(int id, int userId) { if (!_listsRepository.UserOwns(id, userId)) { throw new ValidationException("Unauthorized"); } return(await _listsRepository.DeleteAsync(id)); }