mirror of
https://github.com/strapi/strapi.git
synced 2025-11-02 10:55:37 +00:00
fix: change the updateDocument setCreator in case of new locale
This commit is contained in:
parent
ec7fb54b20
commit
0b7f833b6f
@ -104,7 +104,9 @@ const updateDocument = async (ctx: any, opts?: Options) => {
|
||||
const pickPermittedFields = documentVersion
|
||||
? permissionChecker.sanitizeUpdateInput(documentVersion)
|
||||
: permissionChecker.sanitizeCreateInput;
|
||||
const setCreator = setCreatorFields({ user, isEdition: true });
|
||||
const setCreator = documentVersion
|
||||
? setCreatorFields({ user, isEdition: true })
|
||||
: setCreatorFields({ user });
|
||||
const sanitizeFn = async.pipe(pickPermittedFields, setCreator as any);
|
||||
const sanitizedBody = await sanitizeFn(body);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user