mirror of
https://github.com/immich-app/immich.git
synced 2025-12-20 09:15:35 +03:00
refactor(server): user endpoints (#9730)
* refactor(server): user endpoints * fix repos * fix unit tests --------- Co-authored-by: Daniel Dietzler <mail@ddietzler.dev> Co-authored-by: Alex <alex.tran1502@gmail.com>
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
import {
|
||||
AlbumUserRole,
|
||||
getAllSharedLinks,
|
||||
getAllUsers,
|
||||
searchUsers,
|
||||
type AlbumResponseDto,
|
||||
type AlbumUserAddDto,
|
||||
type SharedLinkResponseDto,
|
||||
@@ -36,10 +36,10 @@
|
||||
let sharedLinks: SharedLinkResponseDto[] = [];
|
||||
onMount(async () => {
|
||||
await getSharedLinks();
|
||||
const data = await getAllUsers({ isAll: false });
|
||||
const data = await searchUsers();
|
||||
|
||||
// remove invalid users
|
||||
users = data.filter((user) => !(user.deletedAt || user.id === album.ownerId));
|
||||
// remove album owner
|
||||
users = data.filter((user) => user.id !== album.ownerId);
|
||||
|
||||
// Remove the existed shared users from the album
|
||||
for (const sharedUser of album.albumUsers) {
|
||||
|
||||
Reference in New Issue
Block a user