mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
dht node running on ne typeorm version
This commit is contained in:
parent
e35104faa8
commit
ec4b8294b2
@ -340,7 +340,7 @@ describe('federation', () => {
|
||||
},
|
||||
]
|
||||
await socketEventMocks.data(Buffer.from(JSON.stringify(jsonArray)))
|
||||
result = await DbFederatedCommunity.find({ foreign: true })
|
||||
result = await DbFederatedCommunity.find({ where: { foreign: true } })
|
||||
})
|
||||
|
||||
afterAll(async () => {
|
||||
@ -601,7 +601,7 @@ describe('federation', () => {
|
||||
{ api: 'toolong api', url: 'some valid url' },
|
||||
]
|
||||
await socketEventMocks.data(Buffer.from(JSON.stringify(jsonArray)))
|
||||
result = await DbFederatedCommunity.find({ foreign: true })
|
||||
result = await DbFederatedCommunity.find({ where: { foreign: true } })
|
||||
})
|
||||
|
||||
afterAll(async () => {
|
||||
@ -655,7 +655,7 @@ describe('federation', () => {
|
||||
},
|
||||
]
|
||||
await socketEventMocks.data(Buffer.from(JSON.stringify(jsonArray)))
|
||||
result = await DbFederatedCommunity.find({ foreign: true })
|
||||
result = await DbFederatedCommunity.find({ where: { foreign: true } })
|
||||
})
|
||||
|
||||
afterAll(async () => {
|
||||
@ -791,7 +791,7 @@ describe('federation', () => {
|
||||
]),
|
||||
),
|
||||
)
|
||||
result = await DbFederatedCommunity.find({ foreign: true })
|
||||
result = await DbFederatedCommunity.find({ where: { foreign: true } })
|
||||
})
|
||||
|
||||
afterAll(async () => {
|
||||
|
||||
@ -217,7 +217,7 @@ async function writeFederatedHomeCommunityEntries(pubKey: string): Promise<Commu
|
||||
async function writeHomeCommunityEntry(keyPair: KeyPair): Promise<void> {
|
||||
try {
|
||||
// check for existing homeCommunity entry
|
||||
let homeCom = await DbCommunity.findOne({ foreign: false })
|
||||
let homeCom = await DbCommunity.findOne({ where: { foreign: false } })
|
||||
if (homeCom) {
|
||||
// simply update the existing entry, but it MUST keep the ID and UUID because of possible relations
|
||||
homeCom.publicKey = keyPair.publicKey
|
||||
|
||||
@ -3,7 +3,7 @@ import { logger } from '@/server/logger'
|
||||
|
||||
const getDBVersion = async (): Promise<string | null> => {
|
||||
try {
|
||||
const dbVersion = await Migration.findOne({ order: { version: 'DESC' } })
|
||||
const [dbVersion] = await Migration.find({ order: { version: 'DESC' }, take: 1 })
|
||||
return dbVersion ? dbVersion.fileName : null
|
||||
} catch (error) {
|
||||
logger.error(error)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user