mirror of
https://github.com/paricafe/misskey.git
synced 2024-11-24 12:56:43 -06: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
3 changed files with 11 additions and 10 deletions
|
@ -25,6 +25,7 @@
|
|||
|
||||
### Server
|
||||
- Fix: nodeinfoにenableMcaptchaとenableTurnstileが無いのを修正
|
||||
- エンドポイント`flash/update`の`flashId`以外のパラメータは必須ではなくなりました
|
||||
- Fix: 禁止キーワードを含むノートがDelayed Queueに追加されて再処理される問題を修正
|
||||
|
||||
## 2024.2.0
|
||||
|
|
|
@ -51,7 +51,7 @@ export const paramDef = {
|
|||
} },
|
||||
visibility: { type: 'string', enum: ['public', 'private'] },
|
||||
},
|
||||
required: ['flashId', 'title', 'summary', 'script', 'permissions'],
|
||||
required: ['flashId'],
|
||||
} as const;
|
||||
|
||||
@Injectable()
|
||||
|
@ -71,11 +71,11 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
|
||||
await this.flashsRepository.update(flash.id, {
|
||||
updatedAt: new Date(),
|
||||
title: ps.title,
|
||||
summary: ps.summary,
|
||||
script: ps.script,
|
||||
permissions: ps.permissions,
|
||||
visibility: ps.visibility,
|
||||
...Object.fromEntries(
|
||||
Object.entries(ps).filter(
|
||||
([key, val]) => (key !== 'flashId') && Object.hasOwn(paramDef.properties, key)
|
||||
)
|
||||
),
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
@ -22927,10 +22927,10 @@ export type operations = {
|
|||
'application/json': {
|
||||
/** Format: misskey:id */
|
||||
flashId: string;
|
||||
title: string;
|
||||
summary: string;
|
||||
script: string;
|
||||
permissions: string[];
|
||||
title?: string;
|
||||
summary?: string;
|
||||
script?: string;
|
||||
permissions?: string[];
|
||||
/** @enum {string} */
|
||||
visibility?: 'public' | 'private';
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue