1
0
mirror of https://gitlab.com/bramw/baserow.git synced 2024-11-25 00:46:46 +00:00
bramw_baserow/web-frontend/modules/database/utils/action.js
2023-10-20 15:35:18 +00:00

18 lines
441 B
JavaScript

import { v4 as uuidv4 } from 'uuid'
export const createNewUndoRedoActionGroupId = () => {
return uuidv4()
}
export const UNDO_REDO_ACTION_GROUP_HEADER = 'ClientUndoRedoActionGroupId'
export const getUndoRedoActionRequestConfig = ({ undoRedoActionGroupId }) => {
const config = {}
if (undoRedoActionGroupId != null) {
config.headers = {
[UNDO_REDO_ACTION_GROUP_HEADER]: undoRedoActionGroupId,
}
return config
}
}