mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
Merge remote-tracking branch 'origin/master' into
3263-feature-gms-publish-user-backend-update-user-settings
This commit is contained in:
commit
548a09fefd
@ -12,7 +12,7 @@ Decimal.set({
|
||||
})
|
||||
|
||||
const constants = {
|
||||
DB_VERSION: '0079-introduce_gms_registration',
|
||||
DB_VERSION: '0080-introduce_gms_registration',
|
||||
DECAY_START_TIME: new Date('2021-05-13 17:46:31-0000'), // GMT+0
|
||||
LOG4JS_CONFIG: 'log4js-config.json',
|
||||
// default log level on production should be info
|
||||
|
||||
@ -451,6 +451,7 @@ export class ContributionResolver {
|
||||
transaction.userId = contribution.userId
|
||||
transaction.userGradidoID = user.gradidoID
|
||||
transaction.userName = fullName(user.firstName, user.lastName)
|
||||
transaction.linkedUserId = contribution.moderatorId
|
||||
transaction.previous = lastTransaction ? lastTransaction.id : null
|
||||
transaction.amount = contribution.amount
|
||||
transaction.creationDate = contribution.contributionDate
|
||||
|
||||
@ -254,6 +254,9 @@ export class TransactionResolver {
|
||||
// userTransactions.forEach((transaction: dbTransaction) => {
|
||||
// use normal for loop because of timing problems with await in forEach-loop
|
||||
for (const transaction of userTransactions) {
|
||||
if (transaction.typeId === TransactionTypeId.CREATION) {
|
||||
continue
|
||||
}
|
||||
if (transaction.linkedUserId && !involvedUserIds.includes(transaction.linkedUserId)) {
|
||||
involvedUserIds.push(transaction.linkedUserId)
|
||||
}
|
||||
|
||||
@ -1 +1 @@
|
||||
export { Community } from './0079-introduce_gms_registration/Community'
|
||||
export { Community } from './0080-introduce_gms_registration/Community'
|
||||
|
||||
@ -1 +1 @@
|
||||
export { User } from './0079-introduce_gms_registration/User'
|
||||
export { User } from './0080-introduce_gms_registration/User'
|
||||
|
||||
@ -1 +1 @@
|
||||
export { UserContact } from './0079-introduce_gms_registration/UserContact'
|
||||
export { UserContact } from './0080-introduce_gms_registration/UserContact'
|
||||
|
||||
@ -0,0 +1,13 @@
|
||||
export async function upgrade(queryFn: (query: string, values?: any[]) => Promise<Array<any>>) {
|
||||
await queryFn(
|
||||
`UPDATE \`transactions\` AS t
|
||||
JOIN \`contributions\` AS c ON t.id = c.transaction_id
|
||||
SET t.linked_user_id = c.confirmed_by
|
||||
WHERE t.type_id = ?`,
|
||||
[1],
|
||||
)
|
||||
}
|
||||
|
||||
export async function downgrade(queryFn: (query: string, values?: any[]) => Promise<Array<any>>) {
|
||||
await queryFn(`UPDATE \`transactions\` SET \`linked_user_id\` = NULL where \`type_id\` = ?;`, [1])
|
||||
}
|
||||
@ -4,7 +4,7 @@ import dotenv from 'dotenv'
|
||||
dotenv.config()
|
||||
|
||||
const constants = {
|
||||
DB_VERSION: '0079-introduce_gms_registration',
|
||||
DB_VERSION: '0080-introduce_gms_registration',
|
||||
LOG4JS_CONFIG: 'log4js-config.json',
|
||||
// default log level on production should be info
|
||||
LOG_LEVEL: process.env.LOG_LEVEL || 'info',
|
||||
|
||||
@ -10,7 +10,7 @@ Decimal.set({
|
||||
})
|
||||
|
||||
const constants = {
|
||||
DB_VERSION: '0079-introduce_gms_registration',
|
||||
DB_VERSION: '0080-introduce_gms_registration',
|
||||
DECAY_START_TIME: new Date('2021-05-13 17:46:31-0000'), // GMT+0
|
||||
LOG4JS_CONFIG: 'log4js-config.json',
|
||||
// default log level on production should be info
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user