Add unique constraints for ssh login user and login user mapping tables

This commit is contained in:
Tuan Dang
2025-04-11 00:52:50 -07:00
parent 5c40347c52
commit 9e0fdb10b1
2 changed files with 2 additions and 14 deletions
@@ -188,20 +188,6 @@ export const sshHostServiceFactory = ({
});
const newSshHost = await sshHostDAL.transaction(async (tx) => {
const existingHost = await sshHostDAL.findOne(
{
projectId,
hostname
},
tx
);
if (existingHost) {
throw new BadRequestError({
message: `SSH host with hostname ${hostname} already exists`
});
}
const host = await sshHostDAL.create(
{
projectId,