mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-15 21:40:31 +00:00
Add unique constraints for ssh login user and login user mapping tables
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user