fix problem in federation when variables are not defined

This commit is contained in:
Ulf Gebhardt 2023-05-04 01:57:43 +02:00
parent 1fa3396396
commit d636f92261
Signed by: ulfgebhardt
GPG Key ID: DA6B843E748679C9
2 changed files with 3 additions and 7 deletions

View File

@ -27,14 +27,10 @@ export class Client_1_0 {
getPublicKey = async (): Promise<string | undefined> => {
logger.info(`requestGetPublicKey with endpoint='${this.endpoint}'...`)
const variables = {}
try {
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const { data, errors, headers, status } = await this.client.rawRequest(
getPublicKey,
variables,
getPublicKey
)
logger.debug(`Response-Data:`, data, errors, headers, status)
if (data) {

View File

@ -23,8 +23,8 @@ const setHeadersPlugin = {
const filterVariables = (variables: any) => {
const vars = clonedeep(variables)
if (vars.password) vars.password = '***'
if (vars.passwordNew) vars.passwordNew = '***'
if (vars && vars.password) vars.password = '***'
if (vars && vars.passwordNew) vars.passwordNew = '***'
return vars
}