forked from FoundKeyGang/FoundKey
refactor: remove repositoryUrl & feedbackUrl from meta
These two URLs are static so there is no reason to keep them in the database. They are also not even used anywhere by the API, so they can also be removed from there. Where they are used is in the nodeinfo, where they are now hardcoded. While editing the nodeinfo, also uncommented nodeinfo version 2.1.
This commit is contained in:
parent
eeee4c713c
commit
a0940c49a2
6 changed files with 18 additions and 43 deletions
13
packages/backend/migration/1658146000392-remove-repo-url.js
Normal file
13
packages/backend/migration/1658146000392-remove-repo-url.js
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
export class removeRepoUrl1658146000392 {
|
||||||
|
name = 'removeRepoUrl1658146000392';
|
||||||
|
|
||||||
|
async up(queryRunner) {
|
||||||
|
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "repositoryUrl"`);
|
||||||
|
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "feedbackUrl"`);
|
||||||
|
}
|
||||||
|
|
||||||
|
async down(queryRunner) {
|
||||||
|
await queryRunner.query(`ALTER TABLE "meta" ADD "repositoryUrl" character varying(512) not null default 'https://github.com/misskey-dev/misskey'`);
|
||||||
|
await queryRunner.query(`ALTER TABLE "meta" ADD "feedbackUrl" character varying(512) default 'https://github.com/misskey-dev/misskey/issues/new'`);
|
||||||
|
}
|
||||||
|
}
|
|
@ -316,20 +316,6 @@ export class Meta {
|
||||||
})
|
})
|
||||||
public ToSUrl: string | null;
|
public ToSUrl: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
|
||||||
length: 512,
|
|
||||||
default: 'https://github.com/misskey-dev/misskey',
|
|
||||||
nullable: false,
|
|
||||||
})
|
|
||||||
public repositoryUrl: string;
|
|
||||||
|
|
||||||
@Column('varchar', {
|
|
||||||
length: 512,
|
|
||||||
default: 'https://github.com/misskey-dev/misskey/issues/new',
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
public feedbackUrl: string | null;
|
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column('varchar', {
|
||||||
length: 8192,
|
length: 8192,
|
||||||
nullable: true,
|
nullable: true,
|
||||||
|
|
|
@ -294,8 +294,6 @@ export default define(meta, paramDef, async (ps, me) => {
|
||||||
description: instance.description,
|
description: instance.description,
|
||||||
langs: instance.langs,
|
langs: instance.langs,
|
||||||
tosUrl: instance.ToSUrl,
|
tosUrl: instance.ToSUrl,
|
||||||
repositoryUrl: instance.repositoryUrl,
|
|
||||||
feedbackUrl: instance.feedbackUrl,
|
|
||||||
disableRegistration: instance.disableRegistration,
|
disableRegistration: instance.disableRegistration,
|
||||||
disableLocalTimeline: instance.disableLocalTimeline,
|
disableLocalTimeline: instance.disableLocalTimeline,
|
||||||
disableGlobalTimeline: instance.disableGlobalTimeline,
|
disableGlobalTimeline: instance.disableGlobalTimeline,
|
||||||
|
|
|
@ -78,8 +78,6 @@ export const paramDef = {
|
||||||
swPublicKey: { type: 'string', nullable: true },
|
swPublicKey: { type: 'string', nullable: true },
|
||||||
swPrivateKey: { type: 'string', nullable: true },
|
swPrivateKey: { type: 'string', nullable: true },
|
||||||
tosUrl: { type: 'string', nullable: true },
|
tosUrl: { type: 'string', nullable: true },
|
||||||
repositoryUrl: { type: 'string' },
|
|
||||||
feedbackUrl: { type: 'string' },
|
|
||||||
useObjectStorage: { type: 'boolean' },
|
useObjectStorage: { type: 'boolean' },
|
||||||
objectStorageBaseUrl: { type: 'string', nullable: true },
|
objectStorageBaseUrl: { type: 'string', nullable: true },
|
||||||
objectStorageBucket: { type: 'string', nullable: true },
|
objectStorageBucket: { type: 'string', nullable: true },
|
||||||
|
@ -313,14 +311,6 @@ export default define(meta, paramDef, async (ps, me) => {
|
||||||
set.ToSUrl = ps.tosUrl;
|
set.ToSUrl = ps.tosUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ps.repositoryUrl !== undefined) {
|
|
||||||
set.repositoryUrl = ps.repositoryUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ps.feedbackUrl !== undefined) {
|
|
||||||
set.feedbackUrl = ps.feedbackUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ps.useObjectStorage !== undefined) {
|
if (ps.useObjectStorage !== undefined) {
|
||||||
set.useObjectStorage = ps.useObjectStorage;
|
set.useObjectStorage = ps.useObjectStorage;
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,16 +53,6 @@ export const meta = {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
optional: false, nullable: true,
|
optional: false, nullable: true,
|
||||||
},
|
},
|
||||||
repositoryUrl: {
|
|
||||||
type: 'string',
|
|
||||||
optional: false, nullable: false,
|
|
||||||
default: 'https://github.com/misskey-dev/misskey',
|
|
||||||
},
|
|
||||||
feedbackUrl: {
|
|
||||||
type: 'string',
|
|
||||||
optional: false, nullable: false,
|
|
||||||
default: 'https://github.com/misskey-dev/misskey/issues/new',
|
|
||||||
},
|
|
||||||
defaultDarkTheme: {
|
defaultDarkTheme: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
optional: false, nullable: true,
|
optional: false, nullable: true,
|
||||||
|
@ -297,8 +287,6 @@ export default define(meta, paramDef, async (ps, me) => {
|
||||||
description: instance.description,
|
description: instance.description,
|
||||||
langs: instance.langs,
|
langs: instance.langs,
|
||||||
tosUrl: instance.ToSUrl,
|
tosUrl: instance.ToSUrl,
|
||||||
repositoryUrl: instance.repositoryUrl,
|
|
||||||
feedbackUrl: instance.feedbackUrl,
|
|
||||||
disableRegistration: instance.disableRegistration,
|
disableRegistration: instance.disableRegistration,
|
||||||
disableLocalTimeline: instance.disableLocalTimeline,
|
disableLocalTimeline: instance.disableLocalTimeline,
|
||||||
disableGlobalTimeline: instance.disableGlobalTimeline,
|
disableGlobalTimeline: instance.disableGlobalTimeline,
|
||||||
|
|
|
@ -11,10 +11,10 @@ const router = new Router();
|
||||||
const nodeinfo2_1path = '/nodeinfo/2.1';
|
const nodeinfo2_1path = '/nodeinfo/2.1';
|
||||||
const nodeinfo2_0path = '/nodeinfo/2.0';
|
const nodeinfo2_0path = '/nodeinfo/2.0';
|
||||||
|
|
||||||
export const links = [/* (awaiting release) {
|
export const links = [{
|
||||||
rel: 'http://nodeinfo.diaspora.software/ns/schema/2.1',
|
rel: 'http://nodeinfo.diaspora.software/ns/schema/2.1',
|
||||||
href: config.url + nodeinfo2_1path
|
href: config.url + nodeinfo2_1path
|
||||||
}, */{
|
}, {
|
||||||
rel: 'http://nodeinfo.diaspora.software/ns/schema/2.0',
|
rel: 'http://nodeinfo.diaspora.software/ns/schema/2.0',
|
||||||
href: config.url + nodeinfo2_0path,
|
href: config.url + nodeinfo2_0path,
|
||||||
}];
|
}];
|
||||||
|
@ -39,9 +39,9 @@ const nodeinfo2 = async () => {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
software: {
|
software: {
|
||||||
name: 'misskey',
|
name: 'foundkey',
|
||||||
version: config.version,
|
version: config.version,
|
||||||
repository: meta.repositoryUrl,
|
repository: 'https://akkoma.dev/FoundKeyGang/FoundKey',
|
||||||
},
|
},
|
||||||
protocols: ['activitypub'],
|
protocols: ['activitypub'],
|
||||||
services: {
|
services: {
|
||||||
|
@ -64,7 +64,7 @@ const nodeinfo2 = async () => {
|
||||||
langs: meta.langs,
|
langs: meta.langs,
|
||||||
tosUrl: meta.ToSUrl,
|
tosUrl: meta.ToSUrl,
|
||||||
repositoryUrl: meta.repositoryUrl,
|
repositoryUrl: meta.repositoryUrl,
|
||||||
feedbackUrl: meta.feedbackUrl,
|
feedbackUrl: 'ircs://irc.akkoma.dev/foundkey',
|
||||||
disableRegistration: meta.disableRegistration,
|
disableRegistration: meta.disableRegistration,
|
||||||
disableLocalTimeline: meta.disableLocalTimeline,
|
disableLocalTimeline: meta.disableLocalTimeline,
|
||||||
disableGlobalTimeline: meta.disableGlobalTimeline,
|
disableGlobalTimeline: meta.disableGlobalTimeline,
|
||||||
|
|
Loading…
Reference in a new issue