refactor: remove console log

This commit is contained in:
Mauricio Siu
2024-06-08 16:42:50 -06:00
parent 83153471b8
commit b9ab4a4d1a
4 changed files with 38 additions and 56 deletions

View File

@@ -46,9 +46,7 @@ export const getContainers = async () => {
.filter((container) => !container.name.includes("dokploy"));
return containers;
} catch (error) {
console.error(`Execution error: ${error}`);
}
} catch (error) {}
};
export const getConfig = async (containerId: string) => {
@@ -65,9 +63,7 @@ export const getConfig = async (containerId: string) => {
const config = JSON.parse(stdout);
return config;
} catch (error) {
console.error(`Execution error: ${error}`);
}
} catch (error) {}
};
export const getContainersByAppNameMatch = async (appName: string) => {
@@ -103,9 +99,7 @@ export const getContainersByAppNameMatch = async (appName: string) => {
});
return containers || [];
} catch (error) {
console.error(`Execution error: ${error}`);
}
} catch (error) {}
return [];
};
@@ -144,9 +138,7 @@ export const getContainersByAppLabel = async (appName: string) => {
});
return containers || [];
} catch (error) {
console.error(`Execution error: ${error}`);
}
} catch (error) {}
return [];
};

View File

@@ -121,12 +121,3 @@ export const validUniqueServerAppName = async (appName: string) => {
return nonEmptyProjects.length === 0;
};
export const slugifyProjectName = (projectName: string): string => {
return projectName
.toLowerCase()
.replace(/[0-9]/g, "")
.replace(/[^a-z\s-]/g, "")
.replace(/\s+/g, "-")
.replace(/-+/g, "-")
.replace(/^-+|-+$/g, "");
};