Skip to content

armgit / papra

Public Imported from GitHub
0

The minimalistic document archiving platform.

fix(demo): added mock endpoint for configuration retrieval (#80)

Corentin THOMASSET1fc6182a0985
diff --git a/apps/papra-client/src/modules/demo/demo-api-mock.ts b/apps/papra-client/src/modules/demo/demo-api-mock.ts
index bfced411..9848b0c9 100644
--- a/apps/papra-client/src/modules/demo/demo-api-mock.ts
+++ b/apps/papra-client/src/modules/demo/demo-api-mock.ts
@@ -38,6 +38,22 @@ async function deserializeFile({ name, type, content }: Awaited<ReturnType<typeo
}
const inMemoryApiMock: Record<string, { handler: any }> = {
+ ...defineHandler({
+ path: '/api/config',
+ method: 'GET',
+ handler: () => ({
+ config: {
+ auth: {
+ isEmailVerificationRequired: false,
+ isPasswordResetEnabled: false,
+ providers: {
+ github: { isEnabled: false },
+ },
+ },
+ },
+ }),
+ }),
+
...defineHandler({
path: '/api/users/me',
method: 'GET',