summaryrefslogtreecommitdiff
path: root/packages/backend/src/server/api
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2023-10-04 08:46:27 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2023-10-04 08:46:27 +0900
commit17b83ff4c13e873b63262c349ea9c7bade0d656a (patch)
treef4b8e18a2a4d5b5f9c22c53f10ea50a6cf440053 /packages/backend/src/server/api
parentfix: deck uiでuser listを見たときにリプライが表示されない (... (diff)
downloadsharkey-17b83ff4c13e873b63262c349ea9c7bade0d656a.tar.gz
sharkey-17b83ff4c13e873b63262c349ea9c7bade0d656a.tar.bz2
sharkey-17b83ff4c13e873b63262c349ea9c7bade0d656a.zip
enhance: TLキャッシュ容量を設定できるように
Diffstat (limited to 'packages/backend/src/server/api')
-rw-r--r--packages/backend/src/server/api/endpoints/admin/meta.ts103
-rw-r--r--packages/backend/src/server/api/endpoints/admin/update-meta.ts20
-rw-r--r--packages/backend/src/server/api/endpoints/meta.ts4
3 files changed, 77 insertions, 50 deletions
diff --git a/packages/backend/src/server/api/endpoints/admin/meta.ts b/packages/backend/src/server/api/endpoints/admin/meta.ts
index c3ba07cdd0..53e3672784 100644
--- a/packages/backend/src/server/api/endpoints/admin/meta.ts
+++ b/packages/backend/src/server/api/endpoints/admin/meta.ts
@@ -105,40 +105,32 @@ export const meta = {
type: 'boolean',
optional: false, nullable: false,
},
- userStarForReactionFallback: {
- type: 'boolean',
- optional: true, nullable: false,
- },
pinnedUsers: {
type: 'array',
- optional: true, nullable: false,
+ optional: false, nullable: false,
items: {
type: 'string',
- optional: false, nullable: false,
},
},
hiddenTags: {
type: 'array',
- optional: true, nullable: false,
+ optional: false, nullable: false,
items: {
type: 'string',
- optional: false, nullable: false,
},
},
blockedHosts: {
type: 'array',
- optional: true, nullable: false,
+ optional: false, nullable: false,
items: {
type: 'string',
- optional: false, nullable: false,
},
},
sensitiveWords: {
type: 'array',
- optional: true, nullable: false,
+ optional: false, nullable: false,
items: {
type: 'string',
- optional: false, nullable: false,
},
},
preservedUsernames: {
@@ -146,129 +138,124 @@ export const meta = {
optional: false, nullable: false,
items: {
type: 'string',
- optional: false, nullable: false,
},
},
hcaptchaSecretKey: {
type: 'string',
- optional: true, nullable: true,
+ optional: false, nullable: true,
},
recaptchaSecretKey: {
type: 'string',
- optional: true, nullable: true,
+ optional: false, nullable: true,
},
turnstileSecretKey: {
type: 'string',
- optional: true, nullable: true,
+ optional: false, nullable: true,
},
sensitiveMediaDetection: {
type: 'string',
- optional: true, nullable: false,
+ optional: false, nullable: false,
},
sensitiveMediaDetectionSensitivity: {
type: 'string',
- optional: true, nullable: false,
+ optional: false, nullable: false,
},
setSensitiveFlagAutomatically: {
type: 'boolean',
- optional: true, nullable: false,
+ optional: false, nullable: false,
},
enableSensitiveMediaDetectionForVideos: {
type: 'boolean',
- optional: true, nullable: false,
+ optional: false, nullable: false,
},
proxyAccountId: {
type: 'string',
- optional: true, nullable: true,
+ optional: false, nullable: true,
format: 'id',
},
- summaryProxy: {
- type: 'string',
- optional: true, nullable: true,
- },
email: {
type: 'string',
- optional: true, nullable: true,
+ optional: false, nullable: true,
},
smtpSecure: {
type: 'boolean',
- optional: true, nullable: false,
+ optional: false, nullable: false,
},
smtpHost: {
type: 'string',
- optional: true, nullable: true,
+ optional: false, nullable: true,
},
smtpPort: {
type: 'number',
- optional: true, nullable: true,
+ optional: false, nullable: true,
},
smtpUser: {
type: 'string',
- optional: true, nullable: true,
+ optional: false, nullable: true,
},
smtpPass: {
type: 'string',
- optional: true, nullable: true,
+ optional: false, nullable: true,
},
swPrivateKey: {
type: 'string',
- optional: true, nullable: true,
+ optional: false, nullable: true,
},
useObjectStorage: {
type: 'boolean',
- optional: true, nullable: false,
+ optional: false, nullable: false,
},
objectStorageBaseUrl: {
type: 'string',
- optional: true, nullable: true,
+ optional: false, nullable: true,
},
objectStorageBucket: {
type: 'string',
- optional: true, nullable: true,
+ optional: false, nullable: true,
},
objectStoragePrefix: {
type: 'string',
- optional: true, nullable: true,
+ optional: false, nullable: true,
},
objectStorageEndpoint: {
type: 'string',
- optional: true, nullable: true,
+ optional: false, nullable: true,
},
objectStorageRegion: {
type: 'string',
- optional: true, nullable: true,
+ optional: false, nullable: true,
},
objectStoragePort: {
type: 'number',
- optional: true, nullable: true,
+ optional: false, nullable: true,
},
objectStorageAccessKey: {
type: 'string',
- optional: true, nullable: true,
+ optional: false, nullable: true,
},
objectStorageSecretKey: {
type: 'string',
- optional: true, nullable: true,
+ optional: false, nullable: true,
},
objectStorageUseSSL: {
type: 'boolean',
- optional: true, nullable: false,
+ optional: false, nullable: false,
},
objectStorageUseProxy: {
type: 'boolean',
- optional: true, nullable: false,
+ optional: false, nullable: false,
},
objectStorageSetPublicRead: {
type: 'boolean',
- optional: true, nullable: false,
+ optional: false, nullable: false,
},
enableIpLogging: {
type: 'boolean',
- optional: true, nullable: false,
+ optional: false, nullable: false,
},
enableActiveEmailValidation: {
type: 'boolean',
- optional: true, nullable: false,
+ optional: false, nullable: false,
},
enableChartsForRemoteUser: {
type: 'boolean',
@@ -288,12 +275,28 @@ export const meta = {
},
manifestJsonOverride: {
type: 'string',
- optional: true, nullable: false,
+ optional: false, nullable: false,
},
policies: {
type: 'object',
optional: false, nullable: false,
},
+ perLocalUserUserTimelineCacheMax: {
+ type: 'number',
+ optional: false, nullable: false,
+ },
+ perRemoteUserUserTimelineCacheMax: {
+ type: 'number',
+ optional: false, nullable: false,
+ },
+ perUserHomeTimelineCacheMax: {
+ type: 'number',
+ optional: false, nullable: false,
+ },
+ perUserListTimelineCacheMax: {
+ type: 'number',
+ optional: false, nullable: false,
+ },
},
},
} as const;
@@ -313,7 +316,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
private metaService: MetaService,
) {
- super(meta, paramDef, async (ps, me) => {
+ super(meta, paramDef, async () => {
const instance = await this.metaService.fetch(true);
return {
@@ -399,6 +402,10 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
enableIdenticonGeneration: instance.enableIdenticonGeneration,
policies: { ...DEFAULT_POLICIES, ...instance.policies },
manifestJsonOverride: instance.manifestJsonOverride,
+ perLocalUserUserTimelineCacheMax: instance.perLocalUserUserTimelineCacheMax,
+ perRemoteUserUserTimelineCacheMax: instance.perRemoteUserUserTimelineCacheMax,
+ perUserHomeTimelineCacheMax: instance.perUserHomeTimelineCacheMax,
+ perUserListTimelineCacheMax: instance.perUserListTimelineCacheMax,
};
});
}
diff --git a/packages/backend/src/server/api/endpoints/admin/update-meta.ts b/packages/backend/src/server/api/endpoints/admin/update-meta.ts
index ea6ebdd1fe..247d3ba4e0 100644
--- a/packages/backend/src/server/api/endpoints/admin/update-meta.ts
+++ b/packages/backend/src/server/api/endpoints/admin/update-meta.ts
@@ -108,6 +108,10 @@ export const paramDef = {
serverRules: { type: 'array', items: { type: 'string' } },
preservedUsernames: { type: 'array', items: { type: 'string' } },
manifestJsonOverride: { type: 'string' },
+ perLocalUserUserTimelineCacheMax: { type: 'integer' },
+ perRemoteUserUserTimelineCacheMax: { type: 'integer' },
+ perUserHomeTimelineCacheMax: { type: 'integer' },
+ perUserListTimelineCacheMax: { type: 'integer' },
},
required: [],
} as const;
@@ -441,6 +445,22 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
set.manifestJsonOverride = ps.manifestJsonOverride;
}
+ if (ps.perLocalUserUserTimelineCacheMax !== undefined) {
+ set.perLocalUserUserTimelineCacheMax = ps.perLocalUserUserTimelineCacheMax;
+ }
+
+ if (ps.perRemoteUserUserTimelineCacheMax !== undefined) {
+ set.perRemoteUserUserTimelineCacheMax = ps.perRemoteUserUserTimelineCacheMax;
+ }
+
+ if (ps.perUserHomeTimelineCacheMax !== undefined) {
+ set.perUserHomeTimelineCacheMax = ps.perUserHomeTimelineCacheMax;
+ }
+
+ if (ps.perUserListTimelineCacheMax !== undefined) {
+ set.perUserListTimelineCacheMax = ps.perUserListTimelineCacheMax;
+ }
+
const before = await this.metaService.fetch(true);
await this.metaService.update(set);
diff --git a/packages/backend/src/server/api/endpoints/meta.ts b/packages/backend/src/server/api/endpoints/meta.ts
index fa6486ed18..271b3f6fb2 100644
--- a/packages/backend/src/server/api/endpoints/meta.ts
+++ b/packages/backend/src/server/api/endpoints/meta.ts
@@ -214,11 +214,11 @@ export const meta = {
type: 'boolean',
optional: false, nullable: false,
},
- localTimeLine: {
+ localTimeline: {
type: 'boolean',
optional: false, nullable: false,
},
- globalTimeLine: {
+ globalTimeline: {
type: 'boolean',
optional: false, nullable: false,
},