The minimalistic document archiving platform.
fix(custom-properties): return 204 on property deletion (#1141)
Corentin Thomassetf93d6e17936f
diff --git a/.changeset/loud-deer-matter.md b/.changeset/loud-deer-matter.mdnew file mode 100644index 00000000..deff190f--- /dev/null+++ b/.changeset/loud-deer-matter.md@@ -0,0 +1,5 @@+---+"@papra/app": patch+---++Custom property definition deletion endpoint (`DELETE /api/organizations/:organizationId/custom-properties/:propertyDefinitionId`) now returns a 204 with no body instead of a 200 with an empty object.diff --git a/apps/papra-server/src/modules/custom-properties/custom-properties.routes.ts b/apps/papra-server/src/modules/custom-properties/custom-properties.routes.tsindex 478b0a54..bc0afece 100644--- a/apps/papra-server/src/modules/custom-properties/custom-properties.routes.ts+++ b/apps/papra-server/src/modules/custom-properties/custom-properties.routes.ts@@ -167,7 +167,7 @@ function setupDeletePropertyDefinitionRoute({ app, db }: RouteDefinitionContext)customPropertiesRepository,});- return context.json({});+ return context.body(null, 204);},);}diff --git a/apps/papra-server/src/modules/custom-properties/e2e/custom-properties-definitions.e2e.test.ts b/apps/papra-server/src/modules/custom-properties/e2e/custom-properties-definitions.e2e.test.tsindex 5cf0a772..6f38cc26 100644--- a/apps/papra-server/src/modules/custom-properties/e2e/custom-properties-definitions.e2e.test.ts+++ b/apps/papra-server/src/modules/custom-properties/e2e/custom-properties-definitions.e2e.test.ts@@ -149,7 +149,7 @@ describe('custom properties e2e', () => {{ loggedInUserId: USER_ID },);- expect(deleteResponse.status).to.eql(200);+ expect(deleteResponse.status).to.eql(204);const listResponse = await app.request(`/api/organizations/${ORG_ID}/custom-properties`,