Merge branch 'orm' into 'main'
Fix E-Mail See merge request fedeo/backend!13
This commit is contained in:
@@ -140,10 +140,12 @@ export default async function emailAsUserRoutes(server: FastifyInstance) {
|
|||||||
|
|
||||||
const accounts = rows.map(row => {
|
const accounts = rows.map(row => {
|
||||||
const temp: any = {}
|
const temp: any = {}
|
||||||
|
console.log(row)
|
||||||
Object.entries(row).forEach(([key, val]) => {
|
Object.entries(row).forEach(([key, val]) => {
|
||||||
if (key.endsWith("Encrypted")) {
|
console.log(key,val)
|
||||||
|
if (key.endsWith("Encrypted") && val) {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
temp[key.replace("Encrypted", "")] = decrypt(val as string)
|
temp[key.replace("Encrypted", "")] = decrypt(val)
|
||||||
} else {
|
} else {
|
||||||
temp[key] = val
|
temp[key] = val
|
||||||
}
|
}
|
||||||
@@ -189,7 +191,7 @@ export default async function emailAsUserRoutes(server: FastifyInstance) {
|
|||||||
const accountData: any = {}
|
const accountData: any = {}
|
||||||
|
|
||||||
Object.entries(row).forEach(([key, val]) => {
|
Object.entries(row).forEach(([key, val]) => {
|
||||||
if (key.endsWith("Encrypted")) {
|
if (key.endsWith("Encrypted") && val) {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
accountData[key.replace("Encrypted", "")] = decrypt(val as string)
|
accountData[key.replace("Encrypted", "")] = decrypt(val as string)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user