summaryrefslogtreecommitdiff
path: root/packages/backend/src/server/api/endpoints/i
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2022-09-24 17:02:19 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2022-09-24 17:02:19 +0900
commit3c4b7d3bd044ba270e5af5e272bbde76dfad9f71 (patch)
tree6669e531308612d05d56a9ea30b445933650b95b /packages/backend/src/server/api/endpoints/i
parentfix type (diff)
downloadsharkey-3c4b7d3bd044ba270e5af5e272bbde76dfad9f71.tar.gz
sharkey-3c4b7d3bd044ba270e5af5e272bbde76dfad9f71.tar.bz2
sharkey-3c4b7d3bd044ba270e5af5e272bbde76dfad9f71.zip
fix type
Diffstat (limited to 'packages/backend/src/server/api/endpoints/i')
-rw-r--r--packages/backend/src/server/api/endpoints/i/update.ts8
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) {