Address greptile suggestions

This commit is contained in:
Tuan Dang
2025-04-10 16:45:24 -07:00
parent 77dd768a38
commit 264177638f
14 changed files with 48 additions and 214 deletions
@@ -214,14 +214,6 @@ export const sshHostServiceFactory = ({
tx
);
await sshHostLoginUserDAL.insertMany(
loginMappings.map(({ loginUser }) => ({
sshHostId: host.id,
loginUser
})),
tx
);
// (dangtony98): room to optimize
for await (const { loginUser, allowedPrincipals } of loginMappings) {
const sshHostLoginUser = await sshHostLoginUserDAL.create(
@@ -524,7 +516,7 @@ export const sshHostServiceFactory = ({
await sshCertificateDAL.transaction(async (tx) => {
const cert = await sshCertificateDAL.create(
{
sshCaId: host.hostSshCaId,
sshCaId: host.userSshCaId,
sshHostId: host.id,
serialNumber,
certType: SshCertType.USER,