The minimalistic document archiving platform.
feat(demo): add organization settings endpoints (#1237)
Corentin Thomassetd432fb76fb75
diff --git a/apps/papra-client/src/modules/demo/demo-api-mock.ts b/apps/papra-client/src/modules/demo/demo-api-mock.tsindex 46b943cc..d5d20be4 100644--- a/apps/papra-client/src/modules/demo/demo-api-mock.ts+++ b/apps/papra-client/src/modules/demo/demo-api-mock.ts@@ -1513,6 +1513,44 @@ const inMemoryApiMock: Record<string, { handler: any }> = {},}),+ ...defineHandler({+ path: '/api/organizations/:organizationId/settings',+ method: 'GET',+ handler: async ({ params: { organizationId } }) => {+ const organization = await organizationStorage.getItem(organizationId);++ assert(organization, { status: 403 });++ return {+ organizationSettings: {+ ai: {+ autoTagging: {+ isEnabled: false,+ canCreateNewTags: false,+ maxTags: 10,+ },+ },+ },+ };+ },+ }),++ ...defineHandler({+ path: '/api/organizations/:organizationId/settings',+ method: 'PATCH',+ handler: async () => {+ throw Object.assign(new FetchError('Not available in demo'), {+ status: 501,+ data: {+ error: {+ message: 'This feature is not available in demo',+ code: 'demo.not_available',+ },+ },+ });+ },+ }),+...defineHandler({path: '/api/organizations/:organizationId/share-links',method: 'GET',