diff options
| author | tamaina <tamaina@hotmail.co.jp> | 2019-05-14 02:57:04 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2019-05-14 02:57:04 +0900 |
| commit | 7c03d37caa3107c4e21f60563a6f19979d0a509b (patch) | |
| tree | e3861d7d057c5458091df9739fb1e5d11b6d1e16 /src/server/api/endpoints | |
| parent | Fix: user menu (#4845) (#4920) (diff) | |
| download | sharkey-7c03d37caa3107c4e21f60563a6f19979d0a509b.tar.gz sharkey-7c03d37caa3107c4e21f60563a6f19979d0a509b.tar.bz2 sharkey-7c03d37caa3107c4e21f60563a6f19979d0a509b.zip | |
Add ToSUrl, repositoryUrl, feedbackUrl (#4921)
* Add ToSUrl, repositoryUrl, feedbackUrl
* modify nodeinfo
Diffstat (limited to 'src/server/api/endpoints')
| -rw-r--r-- | src/server/api/endpoints/admin/update-meta.ts | 33 | ||||
| -rw-r--r-- | src/server/api/endpoints/meta.ts | 3 |
2 files changed, 36 insertions, 0 deletions
diff --git a/src/server/api/endpoints/admin/update-meta.ts b/src/server/api/endpoints/admin/update-meta.ts index 8a2019fcc1..e34840e907 100644 --- a/src/server/api/endpoints/admin/update-meta.ts +++ b/src/server/api/endpoints/admin/update-meta.ts @@ -330,6 +330,27 @@ export const meta = { 'ja-JP': 'ServiceWorkerのVAPIDキーペアの秘密鍵' } }, + + ToSUrl: { + validator: $.optional.nullable.str, + desc: { + 'ja-JP': '利用規約のURL' + } + }, + + repositoryUrl: { + validator: $.optional.str, + desc: { + 'ja-JP': 'リポジトリのURL' + } + }, + + feedbackUrl: { + validator: $.optional.str, + desc: { + 'ja-JP': 'フィードバックのURL' + } + } } }; @@ -516,6 +537,18 @@ export default define(meta, async (ps) => { set.swPrivateKey = ps.swPrivateKey; } + if (ps.ToSUrl !== undefined) { + set.ToSUrl = ps.ToSUrl; + } + + if (ps.repositoryUrl !== undefined) { + set.repositoryUrl = ps.repositoryUrl; + } + + if (ps.feedbackUrl !== undefined) { + set.feedbackUrl = ps.feedbackUrl; + } + await getConnection().transaction(async transactionalEntityManager => { const meta = await transactionalEntityManager.findOne(Meta, { order: { diff --git a/src/server/api/endpoints/meta.ts b/src/server/api/endpoints/meta.ts index 5667e7fbb4..e29edae266 100644 --- a/src/server/api/endpoints/meta.ts +++ b/src/server/api/endpoints/meta.ts @@ -106,6 +106,9 @@ export default define(meta, async (ps, me) => { uri: config.url, description: instance.description, langs: instance.langs, + ToSUrl: instance.ToSUrl, + repositoryUrl: instance.repositoryUrl, + feedbackUrl: instance.feedbackUrl, secure: config.https != null, machine: os.hostname(), |