upd: allow updating of fields

This commit is contained in:
Mar0xy 2023-10-30 01:32:48 +01:00
parent c88fbe843a
commit 81def9457b
No known key found for this signature in database
GPG key ID: 56569BBE47D2C828
3 changed files with 32 additions and 17 deletions

View file

@ -248,6 +248,11 @@ export default class Misskey implements MegalodonInterface {
bannerId: options.header
})
}
if (options.fields_attributes) {
params = Object.assign(params, {
fields: options.fields_attributes
})
}
if (options.locked !== undefined) {
params = Object.assign(params, {
isLocked: options.locked.toString() === 'true' ? true : false