better error expression, update gradido node default version, update inspector, allow phpmyadmin importing big sql files

This commit is contained in:
einhornimmond 2025-11-19 13:54:48 +01:00
parent 12e61891ba
commit 5f7383a486
4 changed files with 20 additions and 19 deletions

View File

@ -84,7 +84,7 @@ export const configSchema = v.object({
v.string('The version of the DLT node server, for example: 0.9.0'), v.string('The version of the DLT node server, for example: 0.9.0'),
v.regex(/^\d+\.\d+\.\d+$/), v.regex(/^\d+\.\d+\.\d+$/),
), ),
'0.9.1', '0.9.2',
), ),
DLT_GRADIDO_NODE_SERVER_HOME_FOLDER: v.optional( DLT_GRADIDO_NODE_SERVER_HOME_FOLDER: v.optional(
v.string('The home folder for the gradido dlt node server'), v.string('The home folder for the gradido dlt node server'),

View File

@ -104,23 +104,23 @@ export async function loadTransactions(
return result.map((row: any) => { return result.map((row: any) => {
// console.log(row) // console.log(row)
// check for consistent data beforehand
const userCreatedAt = new Date(row.user.createdAt)
const linkedUserCreatedAd = new Date(row.linkedUser.createdAt)
const balanceDate = new Date(row.transaction.balanceDate)
if (
userCreatedAt.getTime() > balanceDate.getTime() ||
linkedUserCreatedAd.getTime() > balanceDate.getTime()
) {
logger.error(`table row: `, row)
throw new Error('at least one user was created after transaction balance date, logic error!')
}
let amount = GradidoUnit.fromString(row.transaction.amount)
if (row.transaction.typeId === TransactionTypeId.SEND) {
amount = amount.mul(new GradidoUnit(-1))
}
try { try {
// check for consistent data beforehand
const userCreatedAt = new Date(row.user.createdAt)
const linkedUserCreatedAd = new Date(row.linkedUser.createdAt)
const balanceDate = new Date(row.transaction.balanceDate)
if (
userCreatedAt.getTime() > balanceDate.getTime() ||
linkedUserCreatedAd.getTime() > balanceDate.getTime()
) {
logger.error(`table row: `, row)
throw new Error('at least one user was created after transaction balance date, logic error!')
}
let amount = GradidoUnit.fromString(row.transaction.amount)
if (row.transaction.typeId === TransactionTypeId.SEND) {
amount = amount.mul(new GradidoUnit(-1))
}
return v.parse(transactionDbSchema, { return v.parse(transactionDbSchema, {
...row.transaction, ...row.transaction,
transactionLinkCode: row.transactionLink ? row.transactionLink.code : null, transactionLinkCode: row.transactionLink ? row.transactionLink.code : null,
@ -128,8 +128,8 @@ export async function loadTransactions(
linkedUser: row.linkedUser, linkedUser: row.linkedUser,
}) })
} catch (e) { } catch (e) {
logger.error(`table row: ${JSON.stringify(row, null, 2)}`)
if (e instanceof v.ValiError) { if (e instanceof v.ValiError) {
logger.error(`table row: ${JSON.stringify(row, null, 2)}`)
logger.error(v.flatten(e.issues)) logger.error(v.flatten(e.issues))
} }
throw e throw e

View File

@ -199,6 +199,7 @@ services:
- debug - debug
environment: environment:
- PMA_ARBITRARY=1 - PMA_ARBITRARY=1
- UPLOAD_LIMIT=200M
#restart: always #restart: always
ports: ports:
- 8074:80 - 8074:80

@ -1 +1 @@
Subproject commit 36045150da1d6c9d9a568d801f327cee40176646 Subproject commit 0c14b7eea29b8911cbe3cb303f5b0b61ce9bf6f4