File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 44
44
"url" : " https://github.com/sponsors/CoCreate-app"
45
45
},
46
46
"main" : " ./src/index.js"
47
- }
47
+ }
Original file line number Diff line number Diff line change @@ -176,6 +176,9 @@ class CoCreateFileSystem {
176
176
data . $filter . query [ 0 ] . value = [ '*' ]
177
177
data . organization_id = process . env . organization_id
178
178
179
+ if ( fileName . startsWith ( '/admin' ) )
180
+ data . $filter . query [ 1 ] . value = '/superadmin' + fileName . replace ( '/admin' , '' )
181
+
179
182
defaultFile = await crud . send ( data )
180
183
181
184
if ( fileName !== '/hostNotFound.html' ) {
@@ -193,6 +196,12 @@ class CoCreateFileSystem {
193
196
}
194
197
195
198
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
+
196
205
crud . send ( {
197
206
method : 'create.object' ,
198
207
array : 'files' ,
You can’t perform that action at this time.
0 commit comments