mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-06-12 09:24:29 +02:00
Logic for new Environment.base field
This commit is contained in:
@@ -101,7 +101,7 @@ function importEnvironment(e: any, workspaceId: string): ExportResources['enviro
|
||||
createdAt: e.created ? new Date(e.created).toISOString().replace('Z', '') : undefined,
|
||||
updatedAt: e.updated ? new Date(e.updated).toISOString().replace('Z', '') : undefined,
|
||||
workspaceId: convertId(workspaceId),
|
||||
environmentId: e.parentId === workspaceId ? null : convertId(e.parentId),
|
||||
base: e.parentId === workspaceId,
|
||||
model: 'environment',
|
||||
name: e.name,
|
||||
variables: Object.entries(e.data).map(([name, value]) => ({
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"environments": [
|
||||
{
|
||||
"createdAt": "2025-01-13T15:15:43.767",
|
||||
"environmentId": null,
|
||||
"base": true,
|
||||
"id": "GENERATE_ID::env_16c0dec5b77c414ae0e419b8f10c3701300c5900",
|
||||
"model": "environment",
|
||||
"name": "Base Environment",
|
||||
@@ -18,7 +18,7 @@
|
||||
},
|
||||
{
|
||||
"createdAt": "2025-01-13T15:15:58.515",
|
||||
"environmentId": "GENERATE_ID::env_16c0dec5b77c414ae0e419b8f10c3701300c5900",
|
||||
"base": false,
|
||||
"id": "GENERATE_ID::env_799ae3d723ef44af91b4817e5d057e6d",
|
||||
"model": "environment",
|
||||
"name": "Production",
|
||||
@@ -33,7 +33,7 @@
|
||||
},
|
||||
{
|
||||
"createdAt": "2025-01-13T15:16:14.707",
|
||||
"environmentId": "GENERATE_ID::env_16c0dec5b77c414ae0e419b8f10c3701300c5900",
|
||||
"base": false,
|
||||
"id": "GENERATE_ID::env_030fbfdbb274426ebd78e2e6518f8553",
|
||||
"model": "environment",
|
||||
"name": "Staging",
|
||||
|
||||
Reference in New Issue
Block a user