feat: add official furnidata sync button for importing all missing items
- API endpoint: /api/admin/import/official/sync-all - Fetches all official Habbo furnidata - Compares with database to find missing items - Imports missing items via SSE batch with progress reporting - 500 item limit for safety - Proper abort signal support - Client component: OfficialSyncClient with progress UI - Updated StudioSyncPage to include Official Furnidata sync option - Uses existing importSingleFurni infrastructure
This commit is contained in:
1 parent
2920a6521b
commit
1dc8d1d46f
3 files changed
+334
No files matched your search
@@ -1,4 +1,5 @@
|
||||
import { redirect } from "next/navigation";
|
||||
import { OfficialSyncClient } from "@/app/admin/import/official/official-sync-client";
|
||||
import { SyncAllClient } from "@/app/admin/import/sync/sync-all-client";
|
||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||
|
||||
@@ -28,6 +29,17 @@ export default async function StudioSyncPage(_props: {
|
||||
</p>
|
||||
<SyncAllClient />
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h2 className="text-lg font-semibold text-muted-foreground mb-2">
|
||||
Official Furnidata
|
||||
</h2>
|
||||
<p className="text-sm text-muted-foreground">
|
||||
Scan the official Habbo furnidata and automatically import any
|
||||
furniture that your hotel doesn't have yet.
|
||||
</p>
|
||||
<OfficialSyncClient />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user