diff options
Diffstat (limited to 'app/Controllers/Http/Dashboard/TransferController.ts')
-rw-r--r-- | app/Controllers/Http/Dashboard/TransferController.ts | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/app/Controllers/Http/Dashboard/TransferController.ts b/app/Controllers/Http/Dashboard/TransferController.ts index a005c1b..b113e50 100644 --- a/app/Controllers/Http/Dashboard/TransferController.ts +++ b/app/Controllers/Http/Dashboard/TransferController.ts | |||
@@ -68,12 +68,16 @@ export default class TransferController { | |||
68 | userId: auth.user?.id, | 68 | userId: auth.user?.id, |
69 | serviceId, | 69 | serviceId, |
70 | name: service.name, | 70 | name: service.name, |
71 | recipeId: service.recipe_id, | 71 | recipeId: service.recipe_id || service.recipeId, |
72 | settings: JSON.stringify(service.settings), | 72 | settings: |
73 | typeof service.settings === 'string' | ||
74 | ? service.settings | ||
75 | : JSON.stringify(service.settings), | ||
73 | }); | 76 | }); |
74 | 77 | ||
75 | // @ts-expect-error Element implicitly has an 'any' type because expression of type 'any' can't be used to index type '{}' | 78 | // @ts-expect-error Element implicitly has an 'any' type because expression of type 'any' can't be used to index type '{}' |
76 | serviceIdTranslation[service.service_id] = serviceId; | 79 | serviceIdTranslation[service.service_id || service.serviceId] = |
80 | serviceId; | ||
77 | } | 81 | } |
78 | } catch (error) { | 82 | } catch (error) { |
79 | // eslint-disable-next-line no-console | 83 | // eslint-disable-next-line no-console |
@@ -109,7 +113,10 @@ export default class TransferController { | |||
109 | name: workspace.name, | 113 | name: workspace.name, |
110 | order: workspace.order, | 114 | order: workspace.order, |
111 | services: JSON.stringify(services), | 115 | services: JSON.stringify(services), |
112 | data: JSON.stringify(workspace.data), | 116 | data: |
117 | typeof workspace.data === 'string' | ||
118 | ? workspace.data | ||
119 | : JSON.stringify(workspace.data), | ||
113 | }); | 120 | }); |
114 | } | 121 | } |
115 | } catch (error) { | 122 | } catch (error) { |