fix: Issue with credentials and workflows not being matched correctly due to incorrect typing (#5011)

* fix: Always return ids as strings
This commit is contained in:
Omar Ajoue
2022-12-22 16:09:06 +01:00
committed by GitHub
parent 67da2d0c72
commit 746e8487d2
3 changed files with 9 additions and 7 deletions

View File

@@ -35,7 +35,13 @@ EECredentialsController.get(
});
// eslint-disable-next-line @typescript-eslint/unbound-method
return allCredentials.map(EECredentials.addOwnerAndSharings);
return allCredentials
.map((credential: CredentialsEntity & CredentialWithSharings) =>
EECredentials.addOwnerAndSharings(credential),
)
.map(
(credential): CredentialWithSharings => ({ ...credential, id: credential.id.toString() }),
);
} catch (error) {
LoggerProxy.error('Request to list credentials failed', error as Error);
throw error;