mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
changes after refactoring problems, eslint shifted in issue #2997
This commit is contained in:
parent
54173857ce
commit
6ec82faa10
@ -1,5 +1,3 @@
|
||||
import { FederatedCommunity as DbFederatedCommunity } from '@entity/FederatedCommunity'
|
||||
|
||||
import { getPublicCommunityInfo } from '@/federation/query/getPublicCommunityInfo'
|
||||
import { backendLogger as logger } from '@/server/logger'
|
||||
|
||||
@ -13,12 +11,7 @@ export interface PublicCommunityInfo {
|
||||
publicKey: string
|
||||
}
|
||||
|
||||
// eslint-disable-next-line camelcase
|
||||
export class Client_1_1 extends Client_1_0 {
|
||||
constructor(dbCom: DbFederatedCommunity) {
|
||||
super(dbCom)
|
||||
}
|
||||
|
||||
getPublicCommunityInfo = async (): Promise<PublicCommunityInfo | undefined> => {
|
||||
logger.info(`getPublicCommunityInfo with endpoint='${this.endpoint}'...`)
|
||||
try {
|
||||
|
||||
@ -7,7 +7,7 @@ import { FederatedCommunity as DbFederatedCommunity } from '@entity/FederatedCom
|
||||
import { backendLogger as logger } from '@/server/logger'
|
||||
|
||||
import { Client } from './client/Client'
|
||||
import { PublicCommunityInfo } from './client/Client_1_1'
|
||||
import { PublicCommunityInfo, Client_1_1 } from './client/Client_1_1'
|
||||
import { ApiVersionType } from './enum/apiVersionType'
|
||||
|
||||
export function startValidateCommunities(timerInterval: number): void {
|
||||
@ -44,10 +44,12 @@ export async function validateCommunities(): Promise<void> {
|
||||
if (pubKey && pubKey === dbCom.publicKey.toString()) {
|
||||
await DbFederatedCommunity.update({ id: dbCom.id }, { verifiedAt: new Date() })
|
||||
logger.info('Federation: verified community', dbCom)
|
||||
const pubComInfo = await client?.getPublicCommunityInfo()
|
||||
if (pubComInfo) {
|
||||
await writeForeignCommunity(dbCom, pubComInfo)
|
||||
logger.info(`Federation: write foreign community... successfully`)
|
||||
if (client instanceof Client_1_1) {
|
||||
const pubComInfo = await client.getPublicCommunityInfo()
|
||||
if (pubComInfo) {
|
||||
await writeForeignCommunity(dbCom, pubComInfo)
|
||||
logger.info(`Federation: write foreign community... successfully`)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
logger.warn(
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
import { Community as DbCommunity } from '@entity/Community'
|
||||
/* @typescript-eslint/no-unused-vars */
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
import { Field, ObjectType } from 'type-graphql'
|
||||
|
||||
@ObjectType()
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
|
||||
/* Basic Options */
|
||||
// "incremental": true, /* Enable incremental compilation */
|
||||
"target": "es6", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', 'ES2021', or 'ESNEXT'. */
|
||||
"target": "esNext", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', 'ES2021', or 'ESNEXT'. */
|
||||
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
|
||||
// "lib": [], /* Specify library files to be included in the compilation. */
|
||||
// "allowJs": true, /* Allow javascript files to be compiled. */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user