implement global update
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
async function update(options) {
|
||||
const {
|
||||
global: globalSlug,
|
||||
depth,
|
||||
locale,
|
||||
fallbackLocale,
|
||||
data,
|
||||
} = options;
|
||||
|
||||
const globalConfig = this.globals.config.find((config) => config.slug === globalSlug);
|
||||
|
||||
return this.operations.globals.update({
|
||||
slug: globalSlug,
|
||||
data,
|
||||
depth,
|
||||
globalConfig,
|
||||
overrideAccess: true,
|
||||
req: {
|
||||
payloadAPI: 'local',
|
||||
locale,
|
||||
fallbackLocale,
|
||||
payload: this,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = update;
|
||||
|
||||
Reference in New Issue
Block a user