diff --git a/core/server/api/canary/snippets.js b/core/server/api/canary/snippets.js index 71ffa9b8b4..3e8bb0d0a1 100644 --- a/core/server/api/canary/snippets.js +++ b/core/server/api/canary/snippets.js @@ -97,6 +97,8 @@ module.exports = { }, permissions: true, query(frame) { + frame.options.require = true; + return models.Snippet.destroy(frame.options) .then(() => null) .catch(models.Snippet.NotFoundError, () => { diff --git a/core/server/api/v3/snippets.js b/core/server/api/v3/snippets.js index 71ffa9b8b4..3e8bb0d0a1 100644 --- a/core/server/api/v3/snippets.js +++ b/core/server/api/v3/snippets.js @@ -97,6 +97,8 @@ module.exports = { }, permissions: true, query(frame) { + frame.options.require = true; + return models.Snippet.destroy(frame.options) .then(() => null) .catch(models.Snippet.NotFoundError, () => {