feat: nextcloud sync
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { client } from "$lib/server/nextcloud";
|
||||
import type { PageServerLoad } from "./$types";
|
||||
|
||||
export const load: PageServerLoad = async () => {
|
||||
try {
|
||||
const content = await client.getFileContents("/musig/Musig.md", { format: "text" });
|
||||
return {
|
||||
content: content as string
|
||||
};
|
||||
} catch (e) {
|
||||
console.error("Error fetching Musig.md from Nextcloud", e);
|
||||
return {
|
||||
content: "Failed to load content from Nextcloud."
|
||||
};
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user