17 lines
502 B
TypeScript
17 lines
502 B
TypeScript
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."
|
|
};
|
|
}
|
|
};
|