mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-23 00:29:22 +09:00
flash/update で部分的に変更できるようにする (#13396)
* make flash/update params optional * Update autogen files pnpm run build-misskey-js-with-types * Update update.ts * Update CHANGELOG.md * hasOwnProperty -> hasOwn Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com> --------- Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
This commit is contained in:
parent
4d6fab06de
commit
bf5952fd63
@ -25,6 +25,7 @@
|
|||||||
|
|
||||||
### Server
|
### Server
|
||||||
- Fix: nodeinfoにenableMcaptchaとenableTurnstileが無いのを修正
|
- Fix: nodeinfoにenableMcaptchaとenableTurnstileが無いのを修正
|
||||||
|
- エンドポイント`flash/update`の`flashId`以外のパラメータは必須ではなくなりました
|
||||||
- Fix: 禁止キーワードを含むノートがDelayed Queueに追加されて再処理される問題を修正
|
- Fix: 禁止キーワードを含むノートがDelayed Queueに追加されて再処理される問題を修正
|
||||||
|
|
||||||
## 2024.2.0
|
## 2024.2.0
|
||||||
|
@ -51,7 +51,7 @@ export const paramDef = {
|
|||||||
} },
|
} },
|
||||||
visibility: { type: 'string', enum: ['public', 'private'] },
|
visibility: { type: 'string', enum: ['public', 'private'] },
|
||||||
},
|
},
|
||||||
required: ['flashId', 'title', 'summary', 'script', 'permissions'],
|
required: ['flashId'],
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
@ -71,11 +71,11 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||||||
|
|
||||||
await this.flashsRepository.update(flash.id, {
|
await this.flashsRepository.update(flash.id, {
|
||||||
updatedAt: new Date(),
|
updatedAt: new Date(),
|
||||||
title: ps.title,
|
...Object.fromEntries(
|
||||||
summary: ps.summary,
|
Object.entries(ps).filter(
|
||||||
script: ps.script,
|
([key, val]) => (key !== 'flashId') && Object.hasOwn(paramDef.properties, key)
|
||||||
permissions: ps.permissions,
|
)
|
||||||
visibility: ps.visibility,
|
),
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -22927,10 +22927,10 @@ export type operations = {
|
|||||||
'application/json': {
|
'application/json': {
|
||||||
/** Format: misskey:id */
|
/** Format: misskey:id */
|
||||||
flashId: string;
|
flashId: string;
|
||||||
title: string;
|
title?: string;
|
||||||
summary: string;
|
summary?: string;
|
||||||
script: string;
|
script?: string;
|
||||||
permissions: string[];
|
permissions?: string[];
|
||||||
/** @enum {string} */
|
/** @enum {string} */
|
||||||
visibility?: 'public' | 'private';
|
visibility?: 'public' | 'private';
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user