autoryzacja google
This commit is contained in:
@@ -94,6 +94,10 @@ public class ClientService {
|
||||
return toDto(clientRepository.save(fromDto(clientDTO)));
|
||||
}
|
||||
|
||||
public Client saveClientToDB(Client client) {
|
||||
return clientRepository.save(client);
|
||||
}
|
||||
|
||||
public ClientDTO updateClient(long id, ClientDTO clientDTO) {
|
||||
Client existingClient = clientRepository.findById(id)
|
||||
.orElseThrow(() -> new EntityNotFoundException("Nie znaleziono ogłoszenia o ID: " + id));
|
||||
@@ -134,4 +138,8 @@ public class ClientService {
|
||||
public Client getClientByEmail(String email) {
|
||||
return clientRepository.findByEmail(email);
|
||||
}
|
||||
|
||||
public Role getUserRole() {
|
||||
return rolesRepository.findRoleByRole("USER");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user