-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(admin): added listing users for admins
- Loading branch information
1 parent
a4dac65
commit dbcc53c
Showing
5 changed files
with
50 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
src/main/java/dev/cloudeko/zenei/domain/feature/ListUsers.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package dev.cloudeko.zenei.domain.feature; | ||
|
||
import dev.cloudeko.zenei.domain.model.user.User; | ||
|
||
import java.util.List; | ||
|
||
public interface ListUsers { | ||
List<User> listUsers(int offset, int limit); | ||
} |
21 changes: 21 additions & 0 deletions
21
src/main/java/dev/cloudeko/zenei/domain/feature/impl/ListUsersImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package dev.cloudeko.zenei.domain.feature.impl; | ||
|
||
import dev.cloudeko.zenei.domain.feature.ListUsers; | ||
import dev.cloudeko.zenei.domain.model.user.User; | ||
import dev.cloudeko.zenei.domain.model.user.UserRepository; | ||
import jakarta.enterprise.context.ApplicationScoped; | ||
import lombok.AllArgsConstructor; | ||
|
||
import java.util.List; | ||
|
||
@ApplicationScoped | ||
@AllArgsConstructor | ||
public class ListUsersImpl implements ListUsers { | ||
|
||
private final UserRepository userRepository; | ||
|
||
@Override | ||
public List<User> listUsers(int offset, int limit) { | ||
return userRepository.listUsers(offset, limit); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters