1
0
Fork 0
mirror of synced 2024-09-20 19:33:10 +12:00

Clean deprecated code

This commit is contained in:
Adria Navarro 2024-09-09 13:52:25 +02:00
parent fb441551cb
commit a2b773372d

View file

@ -205,24 +205,6 @@ export const createActions = context => {
}) })
} }
// Adds schema mutations for multiple fields at once
const addSchemaMutations = mutations => {
const fields = Object.keys(mutations || {})
if (!fields.length) {
return
}
schemaMutations.update($schemaMutations => {
let newSchemaMutations = { ...$schemaMutations }
fields.forEach(field => {
newSchemaMutations[field] = {
...newSchemaMutations[field],
...mutations[field],
}
})
return newSchemaMutations
})
}
// Saves schema changes to the server, if possible // Saves schema changes to the server, if possible
const saveSchemaMutations = async () => { const saveSchemaMutations = async () => {
// If we can't save schema changes then we just want to keep this in memory // If we can't save schema changes then we just want to keep this in memory
@ -312,7 +294,6 @@ export const createActions = context => {
changePrimaryDisplay, changePrimaryDisplay,
addSchemaMutation, addSchemaMutation,
addSubSchemaMutation, addSubSchemaMutation,
addSchemaMutations,
saveSchemaMutations, saveSchemaMutations,
resetSchemaMutations, resetSchemaMutations,
}, },