diff options
Diffstat (limited to 'src/internal-server/app/Controllers/Http')
-rw-r--r-- | src/internal-server/app/Controllers/Http/WorkspaceController.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/internal-server/app/Controllers/Http/WorkspaceController.js b/src/internal-server/app/Controllers/Http/WorkspaceController.js index 4189fbcdd..773312a0b 100644 --- a/src/internal-server/app/Controllers/Http/WorkspaceController.js +++ b/src/internal-server/app/Controllers/Http/WorkspaceController.js | |||
@@ -32,10 +32,12 @@ class WorkspaceController { | |||
32 | } while ((await Workspace.query().where('workspaceId', workspaceId).fetch()).rows.length > 0); // eslint-disable-line no-await-in-loop | 32 | } while ((await Workspace.query().where('workspaceId', workspaceId).fetch()).rows.length > 0); // eslint-disable-line no-await-in-loop |
33 | 33 | ||
34 | const order = (await Workspace.all()).rows.length; | 34 | const order = (await Workspace.all()).rows.length; |
35 | const name = data.name; | ||
36 | delete data.name; | ||
35 | 37 | ||
36 | await Workspace.create({ | 38 | await Workspace.create({ |
37 | workspaceId, | 39 | workspaceId, |
38 | name: data.name, | 40 | name, |
39 | order, | 41 | order, |
40 | services: JSON.stringify([]), | 42 | services: JSON.stringify([]), |
41 | data: JSON.stringify(data), | 43 | data: JSON.stringify(data), |
@@ -43,7 +45,7 @@ class WorkspaceController { | |||
43 | 45 | ||
44 | return response.send({ | 46 | return response.send({ |
45 | userId: 1, | 47 | userId: 1, |
46 | name: data.name, | 48 | name, |
47 | id: workspaceId, | 49 | id: workspaceId, |
48 | order, | 50 | order, |
49 | workspaces: [], | 51 | workspaces: [], |