From 504412112fb8e0962253455644ace20b93bb4901 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Thu, 29 Sep 2022 16:56:46 +0100 Subject: [PATCH] Allow removing CRUD operations from custom datasource plugins. --- packages/backend-core/src/plugin/utils.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/backend-core/src/plugin/utils.js b/packages/backend-core/src/plugin/utils.js index ade84bf44a..60a40f3a76 100644 --- a/packages/backend-core/src/plugin/utils.js +++ b/packages/backend-core/src/plugin/utils.js @@ -67,12 +67,8 @@ function validateDatasource(schema) { description: joi.string().required(), datasource: joi.object().pattern(joi.string(), fieldValidator).required(), query: joi - .object({ - create: queryValidator, - read: queryValidator, - update: queryValidator, - delete: queryValidator, - }) + .object() + .pattern(joi.string(), queryValidator) .unknown(true) .required(), extra: joi.object().pattern(