From 76dc3bcc31ba9937f4b21e547103827c6db52ae4 Mon Sep 17 00:00:00 2001 From: Vincent Hardouin Date: Thu, 13 Jun 2024 14:25:35 +0200 Subject: [PATCH] fix: allow to delete ressource When the delete action is sent, it does not contain a payload, which is not allowed by the current configuration. --- src/plugin.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugin.ts b/src/plugin.ts index 090b7f1..c2cd43a 100644 --- a/src/plugin.ts +++ b/src/plugin.ts @@ -165,7 +165,7 @@ const register = async (server: Hapi.Server, options: ExtendedAdminJSOptions) => ? { auth, payload: { - allow: 'multipart/form-data', + allow: ['multipart/form-data', 'application/json'], multipart: { output: 'stream' }, }, }