mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
feat(server,web): remove external path nonsense and make libraries admin-only (#7237)
* remove external path * open-api * make sql * move library settings to admin panel * Add documentation * show external libraries only * fix library list * make user library settings look good * fix test * fix tests * fix tests * can pick user for library * fix tests * fix e2e * chore: make sql * Use unauth exception * delete user library list * cleanup * fix e2e * fix await lint * chore: remove unused code * chore: cleanup * revert docs * fix: is admin stuff * table alignment --------- Co-authored-by: Jason Rasmussen <jrasm91@gmail.com> Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
parent
369acc7bea
commit
efa6efd200
63 changed files with 783 additions and 1111 deletions
|
|
@ -66,7 +66,6 @@ export type UserResponseDto = {
|
|||
createdAt: string;
|
||||
deletedAt: string | null;
|
||||
email: string;
|
||||
externalPath: string | null;
|
||||
id: string;
|
||||
isAdmin: boolean;
|
||||
memoriesEnabled?: boolean;
|
||||
|
|
@ -462,6 +461,7 @@ export type CreateLibraryDto = {
|
|||
isVisible?: boolean;
|
||||
isWatched?: boolean;
|
||||
name?: string;
|
||||
ownerId?: string;
|
||||
"type": LibraryType;
|
||||
};
|
||||
export type UpdateLibraryDto = {
|
||||
|
|
@ -506,7 +506,6 @@ export type PartnerResponseDto = {
|
|||
createdAt: string;
|
||||
deletedAt: string | null;
|
||||
email: string;
|
||||
externalPath: string | null;
|
||||
id: string;
|
||||
inTimeline?: boolean;
|
||||
isAdmin: boolean;
|
||||
|
|
@ -950,7 +949,6 @@ export type UpdateTagDto = {
|
|||
};
|
||||
export type CreateUserDto = {
|
||||
email: string;
|
||||
externalPath?: string | null;
|
||||
memoriesEnabled?: boolean;
|
||||
name: string;
|
||||
password: string;
|
||||
|
|
@ -960,7 +958,6 @@ export type CreateUserDto = {
|
|||
export type UpdateUserDto = {
|
||||
avatarColor?: UserAvatarColor;
|
||||
email?: string;
|
||||
externalPath?: string;
|
||||
id: string;
|
||||
isAdmin?: boolean;
|
||||
memoriesEnabled?: boolean;
|
||||
|
|
@ -1841,11 +1838,15 @@ export function sendJobCommand({ id, jobCommandDto }: {
|
|||
body: jobCommandDto
|
||||
})));
|
||||
}
|
||||
export function getLibraries(opts?: Oazapfts.RequestOpts) {
|
||||
export function getAllLibraries({ $type }: {
|
||||
$type?: LibraryType;
|
||||
}, opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchJson<{
|
||||
status: 200;
|
||||
data: LibraryResponseDto[];
|
||||
}>("/library", {
|
||||
}>(`/library${QS.query(QS.explode({
|
||||
"type": $type
|
||||
}))}`, {
|
||||
...opts
|
||||
}));
|
||||
}
|
||||
|
|
@ -1869,7 +1870,7 @@ export function deleteLibrary({ id }: {
|
|||
method: "DELETE"
|
||||
}));
|
||||
}
|
||||
export function getLibraryInfo({ id }: {
|
||||
export function getLibrary({ id }: {
|
||||
id: string;
|
||||
}, opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchJson<{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue