mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-06 12:12:16 +00:00
refactor: remove unused environment property in duplicateEnvironment function
Eliminated the 'env' property from the duplicateEnvironment function to streamline the code and improve clarity. This change enhances maintainability by removing unnecessary parameters.
This commit is contained in:
@@ -25,7 +25,6 @@ import {
|
|||||||
import { api } from "@/utils/api";
|
import { api } from "@/utils/api";
|
||||||
|
|
||||||
export type Services = {
|
export type Services = {
|
||||||
appName: string;
|
|
||||||
serverId?: string | null;
|
serverId?: string | null;
|
||||||
name: string;
|
name: string;
|
||||||
type:
|
type:
|
||||||
|
|||||||
@@ -100,7 +100,6 @@ import { appRouter } from "@/server/api/root";
|
|||||||
import { api } from "@/utils/api";
|
import { api } from "@/utils/api";
|
||||||
|
|
||||||
export type Services = {
|
export type Services = {
|
||||||
appName: string;
|
|
||||||
serverId?: string | null;
|
serverId?: string | null;
|
||||||
serverName?: string | null;
|
serverName?: string | null;
|
||||||
name: string;
|
name: string;
|
||||||
@@ -146,7 +145,6 @@ export const extractServicesFromEnvironment = (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
appName: item.appName,
|
|
||||||
name: item.name,
|
name: item.name,
|
||||||
type: "application",
|
type: "application",
|
||||||
id: item.applicationId,
|
id: item.applicationId,
|
||||||
@@ -161,7 +159,6 @@ export const extractServicesFromEnvironment = (
|
|||||||
|
|
||||||
const mariadb: Services[] =
|
const mariadb: Services[] =
|
||||||
environment.mariadb?.map((item) => ({
|
environment.mariadb?.map((item) => ({
|
||||||
appName: item.appName,
|
|
||||||
name: item.name,
|
name: item.name,
|
||||||
type: "mariadb",
|
type: "mariadb",
|
||||||
id: item.mariadbId,
|
id: item.mariadbId,
|
||||||
@@ -174,7 +171,6 @@ export const extractServicesFromEnvironment = (
|
|||||||
|
|
||||||
const postgres: Services[] =
|
const postgres: Services[] =
|
||||||
environment.postgres?.map((item) => ({
|
environment.postgres?.map((item) => ({
|
||||||
appName: item.appName,
|
|
||||||
name: item.name,
|
name: item.name,
|
||||||
type: "postgres",
|
type: "postgres",
|
||||||
id: item.postgresId,
|
id: item.postgresId,
|
||||||
@@ -187,7 +183,6 @@ export const extractServicesFromEnvironment = (
|
|||||||
|
|
||||||
const mongo: Services[] =
|
const mongo: Services[] =
|
||||||
environment.mongo?.map((item) => ({
|
environment.mongo?.map((item) => ({
|
||||||
appName: item.appName,
|
|
||||||
name: item.name,
|
name: item.name,
|
||||||
type: "mongo",
|
type: "mongo",
|
||||||
id: item.mongoId,
|
id: item.mongoId,
|
||||||
@@ -200,7 +195,6 @@ export const extractServicesFromEnvironment = (
|
|||||||
|
|
||||||
const redis: Services[] =
|
const redis: Services[] =
|
||||||
environment.redis?.map((item) => ({
|
environment.redis?.map((item) => ({
|
||||||
appName: item.appName,
|
|
||||||
name: item.name,
|
name: item.name,
|
||||||
type: "redis",
|
type: "redis",
|
||||||
id: item.redisId,
|
id: item.redisId,
|
||||||
@@ -213,7 +207,6 @@ export const extractServicesFromEnvironment = (
|
|||||||
|
|
||||||
const mysql: Services[] =
|
const mysql: Services[] =
|
||||||
environment.mysql?.map((item) => ({
|
environment.mysql?.map((item) => ({
|
||||||
appName: item.appName,
|
|
||||||
name: item.name,
|
name: item.name,
|
||||||
type: "mysql",
|
type: "mysql",
|
||||||
id: item.mysqlId,
|
id: item.mysqlId,
|
||||||
@@ -242,7 +235,6 @@ export const extractServicesFromEnvironment = (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
appName: item.appName,
|
|
||||||
name: item.name,
|
name: item.name,
|
||||||
type: "compose",
|
type: "compose",
|
||||||
id: item.composeId,
|
id: item.composeId,
|
||||||
|
|||||||
Reference in New Issue
Block a user