backend: partially revert repo url change in nodeinfo
All checks were successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
All checks were successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
This commit is contained in:
parent
b18c9b27a6
commit
848b9bcdf1
1 changed files with 5 additions and 1 deletions
|
@ -24,6 +24,7 @@ type NodeInfo2Base = {
|
|||
software: {
|
||||
name: string;
|
||||
version: string;
|
||||
repository?: string;
|
||||
};
|
||||
protocols: string[];
|
||||
services: {
|
||||
|
@ -65,6 +66,7 @@ const nodeinfo2 = async (): Promise<NodeInfo2Base> => {
|
|||
software: {
|
||||
name: 'foundkey',
|
||||
version: config.version,
|
||||
repository,
|
||||
},
|
||||
protocols: ['activitypub'],
|
||||
services: {
|
||||
|
@ -109,13 +111,15 @@ const nodeinfo2 = async (): Promise<NodeInfo2Base> => {
|
|||
router.get(nodeinfo2_1path, async ctx => {
|
||||
const base = await nodeinfo2();
|
||||
|
||||
ctx.body = { version: '2.1', repository, ...base };
|
||||
ctx.body = { version: '2.1', ...base };
|
||||
ctx.set('Cache-Control', 'public, max-age=600');
|
||||
});
|
||||
|
||||
router.get(nodeinfo2_0path, async ctx => {
|
||||
const base = await nodeinfo2();
|
||||
|
||||
delete base.software.repository;
|
||||
|
||||
ctx.body = { version: '2.0', ...base };
|
||||
ctx.set('Cache-Control', 'public, max-age=600');
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue