Revise ssh host alias field handling/validation

This commit is contained in:
Tuan Dang
2025-04-27 14:34:26 -07:00
parent 3d89a7f45d
commit 44ae0519d1
5 changed files with 14 additions and 30 deletions
@@ -193,7 +193,7 @@ export const sshHostServiceFactory = ({
{
projectId,
hostname,
alias,
alias: alias === "" ? null : alias,
userCertTtl,
hostCertTtl,
userSshCaId,
@@ -300,7 +300,7 @@ export const sshHostServiceFactory = ({
sshHostId,
{
hostname,
alias,
alias: alias === "" ? null : alias,
userCertTtl,
hostCertTtl
},
@@ -4,7 +4,7 @@ export type TListSshHostsDTO = Omit<TProjectPermission, "projectId">;
export type TCreateSshHostDTO = {
hostname: string;
alias: string | null;
alias?: string;
userCertTtl: string;
hostCertTtl: string;
loginMappings: {
@@ -20,7 +20,7 @@ export type TCreateSshHostDTO = {
export type TUpdateSshHostDTO = {
sshHostId: string;
hostname?: string;
alias?: string | null;
alias?: string;
userCertTtl?: string;
hostCertTtl?: string;
loginMappings?: {