mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
rollback
This commit is contained in:
parent
ba6a390c7a
commit
05f3742525
@ -78,24 +78,18 @@ export class CommunityResolver {
|
||||
if (homeCom.foreign) {
|
||||
throw new LogError('Error: Only the HomeCommunity could be modified!')
|
||||
}
|
||||
|
||||
if (
|
||||
homeCom.gmsApiKey !== gmsApiKey ||
|
||||
homeCom.location !== location ||
|
||||
homeCom.hieroTopicId !== hieroTopicId
|
||||
) {
|
||||
// TODO: think about this, it is really expected to delete gmsApiKey if no new one is given?
|
||||
homeCom.gmsApiKey = gmsApiKey ?? null
|
||||
if (location) {
|
||||
homeCom.location = Location2Point(location)
|
||||
}
|
||||
// update only with new value, don't overwrite existing value with null or undefined!
|
||||
if (hieroTopicId) {
|
||||
homeCom.hieroTopicId = hieroTopicId
|
||||
}
|
||||
homeCom.hieroTopicId = hieroTopicId ?? null
|
||||
await DbCommunity.save(homeCom)
|
||||
}
|
||||
|
||||
return new AdminCommunityView(homeCom)
|
||||
}
|
||||
}
|
||||
|
||||
@ -447,7 +447,7 @@ export class TransactionResolver {
|
||||
recipientCommunityIdentifier,
|
||||
)
|
||||
if (!recipientUser) {
|
||||
throw new LogError('The recipient user was not found', { recipientIdentifier, recipientCommunityIdentifier })
|
||||
throw new LogError('The recipient user was not found', recipientUser)
|
||||
}
|
||||
logger.addContext('to', recipientUser?.id)
|
||||
if (recipientUser.foreign) {
|
||||
|
||||
@ -39,13 +39,11 @@ export const testEnvironment = async (testLogger = getLogger('apollo'), testI18n
|
||||
}
|
||||
|
||||
export const resetEntity = async (entity: any) => {
|
||||
// delete data and reset autoincrement!
|
||||
await entity.clear()
|
||||
/*const items = await entity.find({ withDeleted: true })
|
||||
const items = await entity.find({ withDeleted: true })
|
||||
if (items.length > 0) {
|
||||
const ids = items.map((e: any) => e.id)
|
||||
await entity.delete(ids)
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
export const resetToken = () => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user