プライバシーポリシー・運営者情報のリンクを追加 (#11925)

* 運営者情報・プライバシーポリシーリンクを追加

* Update Changelog

* Run api extractor

* プライバシーポリシー・利用規約の同意をまとめる

* Update Changelog

* fix lint

* fix

* api extractor

* improve design

* nodeinfoにプライバシーポリシー・運営者情報を追加
This commit is contained in:
かっこかり
2023-10-07 13:13:13 +09:00
committed by GitHub
parent d6ef28d4ca
commit 5e8c0deab3
17 changed files with 160 additions and 23 deletions

View File

@@ -0,0 +1,17 @@
/*
* SPDX-FileCopyrightText: syuilo and other misskey contributors
* SPDX-License-Identifier: AGPL-3.0-only
*/
export class AddSomeUrls1696003580220 {
name = 'AddSomeUrls1696003580220'
async up(queryRunner) {
await queryRunner.query(`ALTER TABLE "meta" ADD "impressumUrl" character varying(1024)`);
await queryRunner.query(`ALTER TABLE "meta" ADD "privacyPolicyUrl" character varying(1024)`);
}
async down(queryRunner) {
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "impressumUrl"`);
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "privacyPolicyUrl"`);
}
}

View File

@@ -335,6 +335,18 @@ export class MiMeta {
})
public feedbackUrl: string | null;
@Column('varchar', {
length: 1024,
nullable: true,
})
public impressumUrl: string | null;
@Column('varchar', {
length: 1024,
nullable: true,
})
public privacyPolicyUrl: string | null;
@Column('varchar', {
length: 8192,
nullable: true,

View File

@@ -102,6 +102,8 @@ export class NodeinfoServerService {
},
langs: meta.langs,
tosUrl: meta.termsOfServiceUrl,
privacyPolicyUrl: meta.privacyPolicyUrl,
impressumUrl: meta.impressumUrl,
repositoryUrl: meta.repositoryUrl,
feedbackUrl: meta.feedbackUrl,
disableRegistration: meta.disableRegistration,

View File

@@ -331,6 +331,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
tosUrl: instance.termsOfServiceUrl,
repositoryUrl: instance.repositoryUrl,
feedbackUrl: instance.feedbackUrl,
impressumUrl: instance.impressumUrl,
privacyPolicyUrl: instance.privacyPolicyUrl,
disableRegistration: instance.disableRegistration,
emailRequiredForSignup: instance.emailRequiredForSignup,
enableHcaptcha: instance.enableHcaptcha,

View File

@@ -86,6 +86,8 @@ export const paramDef = {
tosUrl: { type: 'string', nullable: true },
repositoryUrl: { type: 'string' },
feedbackUrl: { type: 'string' },
impressumUrl: { type: 'string' },
privacyPolicyUrl: { type: 'string' },
useObjectStorage: { type: 'boolean' },
objectStorageBaseUrl: { type: 'string', nullable: true },
objectStorageBucket: { type: 'string', nullable: true },
@@ -345,6 +347,14 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
set.feedbackUrl = ps.feedbackUrl;
}
if (ps.impressumUrl !== undefined) {
set.impressumUrl = ps.impressumUrl;
}
if (ps.privacyPolicyUrl !== undefined) {
set.privacyPolicyUrl = ps.privacyPolicyUrl;
}
if (ps.useObjectStorage !== undefined) {
set.useObjectStorage = ps.useObjectStorage;
}

View File

@@ -299,6 +299,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
tosUrl: instance.termsOfServiceUrl,
repositoryUrl: instance.repositoryUrl,
feedbackUrl: instance.feedbackUrl,
impressumUrl: instance.impressumUrl,
privacyPolicyUrl: instance.privacyPolicyUrl,
disableRegistration: instance.disableRegistration,
emailRequiredForSignup: instance.emailRequiredForSignup,
enableHcaptcha: instance.enableHcaptcha,