mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
remove port from dht-url
This commit is contained in:
parent
9907a4caf4
commit
9419e9062c
@ -719,11 +719,11 @@ describe('federation', () => {
|
||||
JSON.stringify([
|
||||
{
|
||||
api: '1_0',
|
||||
url: 'http://localhost:5001/api/',
|
||||
url: 'http://localhost/api/',
|
||||
},
|
||||
{
|
||||
api: '2_0',
|
||||
url: 'http://localhost:5002/api/',
|
||||
url: 'http://localhost/api/',
|
||||
},
|
||||
]),
|
||||
),
|
||||
@ -747,7 +747,7 @@ describe('federation', () => {
|
||||
foreign: true,
|
||||
publicKey: expect.any(Buffer),
|
||||
apiVersion: '1_0',
|
||||
endPoint: 'http://localhost:5001/api/',
|
||||
endPoint: 'http://localhost/api/',
|
||||
lastAnnouncedAt: expect.any(Date),
|
||||
createdAt: expect.any(Date),
|
||||
updatedAt: null,
|
||||
@ -764,7 +764,7 @@ describe('federation', () => {
|
||||
foreign: true,
|
||||
publicKey: expect.any(Buffer),
|
||||
apiVersion: '2_0',
|
||||
endPoint: 'http://localhost:5002/api/',
|
||||
endPoint: 'http://localhost/api/',
|
||||
lastAnnouncedAt: expect.any(Date),
|
||||
createdAt: expect.any(Date),
|
||||
updatedAt: null,
|
||||
@ -786,15 +786,15 @@ describe('federation', () => {
|
||||
JSON.stringify([
|
||||
{
|
||||
api: '1_0',
|
||||
url: 'http://localhost:5001/api/',
|
||||
url: 'http://localhost/api/',
|
||||
},
|
||||
{
|
||||
api: '1_1',
|
||||
url: 'http://localhost:5002/api/',
|
||||
url: 'http://localhost/api/',
|
||||
},
|
||||
{
|
||||
api: '2_0',
|
||||
url: 'http://localhost:5003/api/',
|
||||
url: 'http://localhost/api/',
|
||||
},
|
||||
]),
|
||||
),
|
||||
|
||||
@ -181,11 +181,9 @@ export const startDHT = async (topic: string): Promise<void> => {
|
||||
|
||||
async function writeHomeCommunityEnries(pubKey: any): Promise<CommunityApi[]> {
|
||||
const homeApiVersions: CommunityApi[] = Object.values(ApiVersionType).map(function (apiEnum) {
|
||||
const port =
|
||||
Number.parseInt(CONFIG.FEDERATION_COMMUNITY_API_PORT) + Number(apiEnum.replace('_', ''))
|
||||
const comApi: CommunityApi = {
|
||||
api: apiEnum,
|
||||
url: CONFIG.FEDERATION_COMMUNITY_URL + ':' + port.toString() + '/api/',
|
||||
url: CONFIG.FEDERATION_COMMUNITY_URL + '/api/',
|
||||
}
|
||||
return comApi
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user