[PIE-28] Switch to type-safe API #12

Merged
breadone merged 9 commits from PIE-28-2 into main 2025-08-16 13:17:10 +12:00
Showing only changes of commit 592d55dcb6 - Show all commits

View File

@ -7,17 +7,6 @@ import {
Collection Collection
} from './schema' } from './schema'
const raw_client = new Pocketbase("http://localhost:4321")
raw_client.autoCancellation(false)
// Return a relative url for file instead of full path including localhost, which breaks external access
raw_client.files.getRelativeURL = (record: { [key: string]: any; }, filename: string, queryParams?: FileOptions | undefined) => {
const res = raw_client.files.getURL(record, filename)
return res.substring(21)
}
export { raw_client };
class APIClient { class APIClient {
client: Pocketbase client: Pocketbase