Skip to content

Project NOMAD is an offline-first knowledge and education server. Wikipedia, thousands of books, courses, maps, and optional local AI, all running on hardware you own with no internet required.

TypeScript

fix(admin): missing Zim download API client method

Jake Turner3e4985c3c771
diff --git a/admin/inertia/lib/api.ts b/admin/inertia/lib/api.ts
index 69eb6298..d7f284bd 100644
--- a/admin/inertia/lib/api.ts
+++ b/admin/inertia/lib/api.ts
@@ -76,6 +76,16 @@ class API {
})()
}
+ async downloadRemoteZimFile(url: string) {
+ return catchInternal(async () => {
+ const response = await this.client.post<{ message: string; filename: string; url: string }>(
+ '/zim/download-remote',
+ { url }
+ )
+ return response.data
+ })()
+ }
+
async fetchLatestMapCollections(): Promise<{ success: boolean } | undefined> {
return catchInternal(async () => {
const response = await this.client.post<{ success: boolean }>(