Skip to content

Commit

Permalink
Removing redundant DB queries
Browse files Browse the repository at this point in the history
  • Loading branch information
DomWestAnd committed Jul 7, 2023
1 parent e4aa3f1 commit 2280ede
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,10 @@
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Optional;

@Repository
public interface RoleRepository extends JpaRepository<Role, Integer> {
Optional<Role> findByName(RoleEnum name);
List<Role> findByUsers_Email(String email);
List<Role> findByUsers_Sub(String sub);
}

Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@

@Repository
public interface UserRepository extends JpaRepository<User, Integer> {
boolean existsByEmail(String email);
Optional<User> findByEmail(String email);
boolean existsBySub(String sub);
Optional<User> findBySub(String sub);
}

0 comments on commit 2280ede

Please sign in to comment.