forked from FoundKeyGang/FoundKey
remove unused instance settings
This commit is contained in:
parent
6a17dcf4de
commit
1274af05a4
5 changed files with 13 additions and 27 deletions
13
packages/backend/1678427401214-remove-unused.js
Normal file
13
packages/backend/1678427401214-remove-unused.js
Normal file
|
@ -0,0 +1,13 @@
|
|||
export class removeUnused1678427401214 {
|
||||
name = 'removeUnused1678427401214'
|
||||
|
||||
async up(queryRunner) {
|
||||
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "pinnedPages"`);
|
||||
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "pinnedClipId"`);
|
||||
}
|
||||
|
||||
async down(queryRunner) {
|
||||
await queryRunner.query(`ALTER TABLE "meta" ADD "pinnedClipId" character varying(32)`);
|
||||
await queryRunner.query(`ALTER TABLE "meta" ADD "pinnedPages" character varying(512) array NOT NULL DEFAULT '{/featured,/channels,/explore,/pages,/about-misskey}'`);
|
||||
}
|
||||
}
|
|
@ -82,17 +82,6 @@ export class Meta {
|
|||
})
|
||||
public blockedHosts: string[];
|
||||
|
||||
@Column('varchar', {
|
||||
length: 512, array: true, default: '{/featured,/channels,/explore,/pages,/about-foundkey}',
|
||||
})
|
||||
public pinnedPages: string[];
|
||||
|
||||
@Column({
|
||||
...id(),
|
||||
nullable: true,
|
||||
})
|
||||
public pinnedClipId: Clip['id'] | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 512,
|
||||
nullable: true,
|
||||
|
|
|
@ -288,8 +288,6 @@ export default define(meta, paramDef, async () => {
|
|||
defaultLightTheme: instance.defaultLightTheme,
|
||||
defaultDarkTheme: instance.defaultDarkTheme,
|
||||
enableEmail: instance.enableEmail,
|
||||
pinnedPages: instance.pinnedPages,
|
||||
pinnedClipId: instance.pinnedClipId,
|
||||
cacheRemoteFiles: instance.cacheRemoteFiles,
|
||||
|
||||
useStarForReactionFallback: instance.useStarForReactionFallback,
|
||||
|
|
|
@ -48,10 +48,6 @@ export const paramDef = {
|
|||
proxyAccountId: { type: 'string', format: 'misskey:id', nullable: true },
|
||||
maintainerName: { type: 'string', nullable: true },
|
||||
maintainerEmail: { type: 'string', nullable: true },
|
||||
pinnedPages: { type: 'array', items: {
|
||||
type: 'string',
|
||||
} },
|
||||
pinnedClipId: { type: 'string', format: 'misskey:id', nullable: true },
|
||||
langs: { type: 'array', items: {
|
||||
type: 'string',
|
||||
} },
|
||||
|
@ -209,14 +205,6 @@ export default define(meta, paramDef, async (ps, me) => {
|
|||
set.langs = ps.langs.filter(Boolean);
|
||||
}
|
||||
|
||||
if (Array.isArray(ps.pinnedPages)) {
|
||||
set.pinnedPages = ps.pinnedPages.filter(Boolean);
|
||||
}
|
||||
|
||||
if (ps.pinnedClipId !== undefined) {
|
||||
set.pinnedClipId = ps.pinnedClipId;
|
||||
}
|
||||
|
||||
if (ps.summalyProxy !== undefined) {
|
||||
set.summalyProxy = ps.summalyProxy;
|
||||
}
|
||||
|
|
|
@ -305,8 +305,6 @@ export default define(meta, paramDef, async () => {
|
|||
|
||||
translatorAvailable: translatorAvailable(instance),
|
||||
|
||||
pinnedPages: instance.pinnedPages,
|
||||
pinnedClipId: instance.pinnedClipId,
|
||||
cacheRemoteFiles: instance.cacheRemoteFiles,
|
||||
requireSetup: (await Users.countBy({
|
||||
host: IsNull(),
|
||||
|
|
Loading…
Reference in a new issue