mirror of
https://github.com/immich-app/immich.git
synced 2025-12-27 01:11:42 +03:00
fix(server): album statistics endpoint (#11924)
This commit is contained in:
@@ -660,16 +660,16 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/albums/count": {
|
||||
"/albums/statistics": {
|
||||
"get": {
|
||||
"operationId": "getAlbumCount",
|
||||
"operationId": "getAlbumStatistics",
|
||||
"parameters": [],
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/AlbumCountResponseDto"
|
||||
"$ref": "#/components/schemas/AlbumStatisticsResponseDto"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -7505,25 +7505,6 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"AlbumCountResponseDto": {
|
||||
"properties": {
|
||||
"notShared": {
|
||||
"type": "integer"
|
||||
},
|
||||
"owned": {
|
||||
"type": "integer"
|
||||
},
|
||||
"shared": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"notShared",
|
||||
"owned",
|
||||
"shared"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"AlbumResponseDto": {
|
||||
"properties": {
|
||||
"albumName": {
|
||||
@@ -7611,6 +7592,25 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"AlbumStatisticsResponseDto": {
|
||||
"properties": {
|
||||
"notShared": {
|
||||
"type": "integer"
|
||||
},
|
||||
"owned": {
|
||||
"type": "integer"
|
||||
},
|
||||
"shared": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"notShared",
|
||||
"owned",
|
||||
"shared"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"AlbumUserAddDto": {
|
||||
"properties": {
|
||||
"role": {
|
||||
|
||||
@@ -268,7 +268,7 @@ export type CreateAlbumDto = {
|
||||
assetIds?: string[];
|
||||
description?: string;
|
||||
};
|
||||
export type AlbumCountResponseDto = {
|
||||
export type AlbumStatisticsResponseDto = {
|
||||
notShared: number;
|
||||
owned: number;
|
||||
shared: number;
|
||||
@@ -1369,11 +1369,11 @@ export function createAlbum({ createAlbumDto }: {
|
||||
body: createAlbumDto
|
||||
})));
|
||||
}
|
||||
export function getAlbumCount(opts?: Oazapfts.RequestOpts) {
|
||||
export function getAlbumStatistics(opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchJson<{
|
||||
status: 200;
|
||||
data: AlbumCountResponseDto;
|
||||
}>("/albums/count", {
|
||||
data: AlbumStatisticsResponseDto;
|
||||
}>("/albums/statistics", {
|
||||
...opts
|
||||
}));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user