diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2022-09-24 17:02:19 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2022-09-24 17:02:19 +0900 |
| commit | 3c4b7d3bd044ba270e5af5e272bbde76dfad9f71 (patch) | |
| tree | 6669e531308612d05d56a9ea30b445933650b95b /packages | |
| parent | fix type (diff) | |
| download | sharkey-3c4b7d3bd044ba270e5af5e272bbde76dfad9f71.tar.gz sharkey-3c4b7d3bd044ba270e5af5e272bbde76dfad9f71.tar.bz2 sharkey-3c4b7d3bd044ba270e5af5e272bbde76dfad9f71.zip | |
fix type
Diffstat (limited to 'packages')
| -rw-r--r-- | packages/backend/src/server/api/endpoints/i/update.ts | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/packages/backend/src/server/api/endpoints/i/update.ts b/packages/backend/src/server/api/endpoints/i/update.ts index 9bf0616e3a..c2231f5f75 100644 --- a/packages/backend/src/server/api/endpoints/i/update.ts +++ b/packages/backend/src/server/api/endpoints/i/update.ts @@ -78,7 +78,7 @@ export const paramDef = { description: { ...descriptionSchema, nullable: true }, location: { ...locationSchema, nullable: true }, birthday: { ...birthdaySchema, nullable: true }, - lang: { type: 'string', enum: [null, ...Object.keys(langmap)], nullable: true }, + lang: { type: 'string', enum: [null, ...Object.keys(langmap)] as string[], nullable: true }, avatarId: { type: 'string', format: 'misskey:id', nullable: true }, bannerId: { type: 'string', format: 'misskey:id', nullable: true }, fields: { @@ -109,9 +109,7 @@ export const paramDef = { alwaysMarkNsfw: { type: 'boolean' }, autoSensitive: { type: 'boolean' }, ffVisibility: { type: 'string', enum: ['public', 'followers', 'private'] }, - pinnedPageId: { type: 'array', items: { - type: 'string', format: 'misskey:id', - } }, + pinnedPageId: { type: 'string', format: 'misskey:id' }, mutedWords: { type: 'array' }, mutedInstances: { type: 'array', items: { type: 'string', @@ -266,7 +264,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // Publish meUpdated event this.globalEventService.publishMainStream(user.id, 'meUpdated', iObj); - this.globalEventService.publishUserEvent(user.id, 'updateUserProfile', await this.userProfilesRepository.findOneBy({ userId: user.id })); + this.globalEventService.publishUserEvent(user.id, 'updateUserProfile', await this.userProfilesRepository.findOneByOrFail({ userId: user.id })); // 鍵垢を解除したとき、溜まっていたフォローリクエストがあるならすべて承認 if (user.isLocked && ps.isLocked === false) { |