From 70f5181f92b3397788ff0fbf839b71b3ed70e2a9 Mon Sep 17 00:00:00 2001 From: nileshgulia1 Date: Mon, 8 Nov 2021 23:24:30 +0530 Subject: [PATCH] update --- .../volto/actions/content/content.js | 44 ------------------- 1 file changed, 44 deletions(-) diff --git a/src/customizations/volto/actions/content/content.js b/src/customizations/volto/actions/content/content.js index fab0dd7..1df077c 100644 --- a/src/customizations/volto/actions/content/content.js +++ b/src/customizations/volto/actions/content/content.js @@ -11,8 +11,6 @@ import { ORDER_CONTENT, RESET_CONTENT, UPDATECOLUMNS_CONTENT, - LOCK_CONTENT, - UNLOCK_CONTENT, } from '@plone/volto/constants/ActionTypes'; import { nestContent } from '@plone/volto/helpers'; import config from '@plone/volto/registry'; @@ -201,45 +199,3 @@ export function updateColumnsContent(url, index) { indexcolumns: index, }; } - -/** - * Lock content function. - * @function lockContent - * @param {string} urls Content url(s) - * @returns {Object} Lock content action. - */ -export function lockContent(urls) { - return { - type: LOCK_CONTENT, - mode: 'serial', - request: - typeof urls === 'string' - ? { op: 'post', path: `${urls}/@lock` } - : urls.map((url) => ({ op: 'post', path: `${url}/@lock` })), - }; -} - -/** - * Unlock content function. - * @function unlockContent - * @param {string|Array} urls Content url(s). - * @returns {Object} Unlock content action. - */ -export function unlockContent(urls, force = false) { - return { - type: UNLOCK_CONTENT, - mode: 'serial', - request: - typeof urls === 'string' - ? { - op: 'del', - path: `${urls}/@lock`, - data: force ? { force: true } : {}, - } - : urls.map((url) => ({ - op: 'del', - path: `${url}/@lock`, - data: force ? { force: true } : {}, - })), - }; -}