mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
fix missing file
This commit is contained in:
parent
9e0b1f72e8
commit
54d6eb03c5
@ -7,7 +7,7 @@ module.exports = {
|
||||
collectCoverageFrom: ['src/**/*.ts', '!**/node_modules/**', '!src/seeds/**', '!build/**'],
|
||||
coverageThreshold: {
|
||||
global: {
|
||||
lines: 83,
|
||||
lines: 82,
|
||||
},
|
||||
},
|
||||
setupFiles: ['<rootDir>/test/testSetup.ts'],
|
||||
|
||||
5
dht-node/src/dht_node/ApiVersionType.ts
Normal file
5
dht-node/src/dht_node/ApiVersionType.ts
Normal file
@ -0,0 +1,5 @@
|
||||
export enum ApiVersionType {
|
||||
V1_0 = '1_0',
|
||||
V1_1 = '1_1', // currently no changes
|
||||
V2_0 = '2_0', // not exist
|
||||
}
|
||||
@ -8,6 +8,7 @@ import { v4 as uuidv4 } from 'uuid'
|
||||
|
||||
import { CONFIG } from '@/config'
|
||||
import { logger } from '@/server/logger'
|
||||
import { ApiVersionType } from './ApiVersionType'
|
||||
|
||||
const KEY_SECRET_SEEDBYTES = 32
|
||||
|
||||
@ -16,11 +17,6 @@ const SUCCESSTIME = 120000
|
||||
const ERRORTIME = 240000
|
||||
const ANNOUNCETIME = 30000
|
||||
|
||||
enum ApiVersionType {
|
||||
V1_0 = '1_0',
|
||||
V1_1 = '1_1', // currently no changes
|
||||
V2_0 = '2_0', // not exist
|
||||
}
|
||||
type CommunityApi = {
|
||||
api: string
|
||||
url: string
|
||||
@ -194,6 +190,9 @@ async function writeFederatedHomeCommunityEntries(pubKey: string): Promise<Commu
|
||||
const homeApiVersions: CommunityApi[] = CONFIG.FEDERATION_COMMUNITY_APIS.split(',').map(function (
|
||||
api,
|
||||
) {
|
||||
if (!Object.values(ApiVersionType).includes(api as ApiVersionType)) {
|
||||
throw new Error(`Federation: unknown api version: ${api}`)
|
||||
}
|
||||
const comApi: CommunityApi = {
|
||||
api,
|
||||
url: CONFIG.FEDERATION_COMMUNITY_URL + '/api/',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user