summaryrefslogtreecommitdiff
path: root/packages/backend/src/server/api/endpoints/admin/meta.ts
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2023-02-17 15:36:36 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2023-02-17 15:36:36 +0900
commit60df819c60824611cff24db1428d9b46a56e6b92 (patch)
tree46fc8fafb13f012b0caaee9cf912ab77580a3767 /packages/backend/src/server/api/endpoints/admin/meta.ts
parentrefactor: fix types (diff)
downloadsharkey-60df819c60824611cff24db1428d9b46a56e6b92.tar.gz
sharkey-60df819c60824611cff24db1428d9b46a56e6b92.tar.bz2
sharkey-60df819c60824611cff24db1428d9b46a56e6b92.zip
refactor: fix types
Diffstat (limited to 'packages/backend/src/server/api/endpoints/admin/meta.ts')
-rw-r--r--packages/backend/src/server/api/endpoints/admin/meta.ts81
1 files changed, 8 insertions, 73 deletions
diff --git a/packages/backend/src/server/api/endpoints/admin/meta.ts b/packages/backend/src/server/api/endpoints/admin/meta.ts
index 2b19104ea7..9eef1b29c5 100644
--- a/packages/backend/src/server/api/endpoints/admin/meta.ts
+++ b/packages/backend/src/server/api/endpoints/admin/meta.ts
@@ -54,86 +54,22 @@ export const meta = {
},
mascotImageUrl: {
type: 'string',
- optional: false, nullable: false,
+ optional: false, nullable: true,
default: '/assets/ai.png',
},
bannerUrl: {
type: 'string',
- optional: false, nullable: false,
+ optional: false, nullable: true,
},
errorImageUrl: {
type: 'string',
- optional: false, nullable: false,
+ optional: false, nullable: true,
default: 'https://xn--931a.moe/aiart/yubitun.png',
},
iconUrl: {
type: 'string',
optional: false, nullable: true,
},
- maxNoteTextLength: {
- type: 'number',
- optional: false, nullable: false,
- },
- emojis: {
- type: 'array',
- optional: false, nullable: false,
- items: {
- type: 'object',
- optional: false, nullable: false,
- properties: {
- id: {
- type: 'string',
- optional: false, nullable: false,
- format: 'id',
- },
- aliases: {
- type: 'array',
- optional: false, nullable: false,
- items: {
- type: 'string',
- optional: false, nullable: false,
- },
- },
- category: {
- type: 'string',
- optional: false, nullable: true,
- },
- host: {
- type: 'string',
- optional: false, nullable: true,
- },
- url: {
- type: 'string',
- optional: false, nullable: false,
- format: 'url',
- },
- },
- },
- },
- ads: {
- type: 'array',
- optional: false, nullable: false,
- items: {
- type: 'object',
- optional: false, nullable: false,
- properties: {
- place: {
- type: 'string',
- optional: false, nullable: false,
- },
- url: {
- type: 'string',
- optional: false, nullable: false,
- format: 'url',
- },
- imageUrl: {
- type: 'string',
- optional: false, nullable: false,
- format: 'url',
- },
- },
- },
- },
enableEmail: {
type: 'boolean',
optional: false, nullable: false,
@@ -146,10 +82,6 @@ export const meta = {
type: 'boolean',
optional: false, nullable: false,
},
- proxyAccountName: {
- type: 'string',
- optional: false, nullable: true,
- },
userStarForReactionFallback: {
type: 'boolean',
optional: true, nullable: false,
@@ -228,7 +160,7 @@ export const meta = {
optional: true, nullable: true,
},
smtpPort: {
- type: 'string',
+ type: 'number',
optional: true, nullable: true,
},
smtpUser: {
@@ -299,6 +231,10 @@ export const meta = {
type: 'boolean',
optional: true, nullable: false,
},
+ policies: {
+ type: 'object',
+ optional: false, nullable: false,
+ },
},
},
} as const;
@@ -349,7 +285,6 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
iconUrl: instance.iconUrl,
backgroundImageUrl: instance.backgroundImageUrl,
logoImageUrl: instance.logoImageUrl,
- maxNoteTextLength: MAX_NOTE_TEXT_LENGTH, // 後方互換性のため
defaultLightTheme: instance.defaultLightTheme,
defaultDarkTheme: instance.defaultDarkTheme,
enableEmail: instance.enableEmail,