mirror of
https://github.com/immich-app/immich.git
synced 2026-03-22 21:39:58 +03:00
refactor: use GET/Query for report fetch
Signed-off-by: izzy <me@insrt.uk>
This commit is contained in:
@@ -561,20 +561,41 @@
|
||||
}
|
||||
},
|
||||
"/admin/integrity/report": {
|
||||
"post": {
|
||||
"get": {
|
||||
"description": "Get all flagged items by integrity report type",
|
||||
"operationId": "getIntegrityReport",
|
||||
"parameters": [],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/IntegrityGetReportDto"
|
||||
}
|
||||
"parameters": [
|
||||
{
|
||||
"name": "cursor",
|
||||
"required": false,
|
||||
"in": "query",
|
||||
"description": "Cursor for pagination",
|
||||
"schema": {
|
||||
"format": "uuid",
|
||||
"default": 1,
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"name": "limit",
|
||||
"required": false,
|
||||
"in": "query",
|
||||
"description": "Number of items per page",
|
||||
"schema": {
|
||||
"minimum": 1,
|
||||
"default": 500,
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "type",
|
||||
"required": true,
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/IntegrityReportType"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
@@ -18274,29 +18295,6 @@
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"IntegrityGetReportDto": {
|
||||
"properties": {
|
||||
"cursor": {
|
||||
"format": "uuid",
|
||||
"type": "string"
|
||||
},
|
||||
"limit": {
|
||||
"minimum": 1,
|
||||
"type": "number"
|
||||
},
|
||||
"type": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/IntegrityReportType"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"IntegrityReportDto": {
|
||||
"properties": {
|
||||
"id": {
|
||||
|
||||
@@ -70,11 +70,6 @@ export type DatabaseBackupListResponseDto = {
|
||||
export type DatabaseBackupUploadDto = {
|
||||
file?: Blob;
|
||||
};
|
||||
export type IntegrityGetReportDto = {
|
||||
cursor?: string;
|
||||
limit?: number;
|
||||
"type": IntegrityReportType;
|
||||
};
|
||||
export type IntegrityReportDto = {
|
||||
id: string;
|
||||
path: string;
|
||||
@@ -3413,17 +3408,21 @@ export function downloadDatabaseBackup({ filename }: {
|
||||
/**
|
||||
* Get integrity report by type
|
||||
*/
|
||||
export function getIntegrityReport({ integrityGetReportDto }: {
|
||||
integrityGetReportDto: IntegrityGetReportDto;
|
||||
export function getIntegrityReport({ cursor, limit, $type }: {
|
||||
cursor?: string;
|
||||
limit?: number;
|
||||
$type: IntegrityReportType;
|
||||
}, opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchJson<{
|
||||
status: 200;
|
||||
data: IntegrityReportResponseDto;
|
||||
}>("/admin/integrity/report", oazapfts.json({
|
||||
...opts,
|
||||
method: "POST",
|
||||
body: integrityGetReportDto
|
||||
})));
|
||||
}>(`/admin/integrity/report${QS.query(QS.explode({
|
||||
cursor,
|
||||
limit,
|
||||
"type": $type
|
||||
}))}`, {
|
||||
...opts
|
||||
}));
|
||||
}
|
||||
/**
|
||||
* Delete integrity report item
|
||||
|
||||
Reference in New Issue
Block a user