mirror of
https://github.com/immich-app/immich.git
synced 2026-03-23 13:09:50 +03:00
refactor: use GET/Query for report fetch
Signed-off-by: izzy <me@insrt.uk>
This commit is contained in:
@@ -17,14 +17,13 @@
|
||||
|
||||
let { data }: Props = $props();
|
||||
|
||||
// svelte-ignore state_referenced_locally
|
||||
let integrityReport = $state(data.integrityReport);
|
||||
|
||||
async function loadMore() {
|
||||
const { items, nextCursor } = await getIntegrityReport({
|
||||
integrityGetReportDto: {
|
||||
type: data.type,
|
||||
cursor: integrityReport.nextCursor,
|
||||
},
|
||||
$type: data.type,
|
||||
cursor: integrityReport.nextCursor,
|
||||
});
|
||||
|
||||
integrityReport.items.push(...items);
|
||||
@@ -41,9 +40,7 @@
|
||||
expectingUpdate = true;
|
||||
} else if (expectingUpdate) {
|
||||
integrityReport = await getIntegrityReport({
|
||||
integrityGetReportDto: {
|
||||
type: data.type,
|
||||
},
|
||||
$type: data.type,
|
||||
});
|
||||
expectingUpdate = false;
|
||||
}
|
||||
|
||||
@@ -8,9 +8,7 @@ export const load = (async ({ params, url }) => {
|
||||
|
||||
await authenticate(url, { admin: true });
|
||||
const integrityReport = await getIntegrityReport({
|
||||
integrityGetReportDto: {
|
||||
type,
|
||||
},
|
||||
$type: type,
|
||||
});
|
||||
const $t = await getFormatter();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user