Skip to content

Commit 528bdf9

Browse files
committed
bump dependencies
1 parent 7020ee8 commit 528bdf9

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,4 @@
4444
"url": "https://github.com/sponsors/CoCreate-app"
4545
},
4646
"main": "./src/index.js"
47-
}
47+
}

src/index.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,9 @@ class CoCreateFileSystem {
176176
data.$filter.query[0].value = ['*']
177177
data.organization_id = process.env.organization_id
178178

179+
if (fileName.startsWith('/admin'))
180+
data.$filter.query[1].value = '/superadmin' + fileName.replace('/admin', '')
181+
179182
defaultFile = await crud.send(data)
180183

181184
if (fileName !== '/hostNotFound.html') {
@@ -193,6 +196,12 @@ class CoCreateFileSystem {
193196
}
194197

195198
if (defaultFile && defaultFile.object && defaultFile.object[0] && defaultFile.object[0].src) {
199+
if (fileName.startsWith('/admin')) {
200+
data.object[0].directory = 'admin'
201+
data.object[0].path = '/admin' + data.object[0].path.replace('/superadmin', '')
202+
data.object[0].pathname = fileName
203+
}
204+
196205
crud.send({
197206
method: 'create.object',
198207
array: 'files',

0 commit comments

Comments
 (0)