File tree 1 file changed +5
-2
lines changed
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,9 @@ import identifyRoute from '../middleware/identify-route-middleware';
12
12
import clientSideRoomAliasHashRedirectRoute from './client-side-room-alias-hash-redirect-route' ;
13
13
import redirectToCorrectArchiveUrlIfBadSigil from '../middleware/redirect-to-correct-archive-url-if-bad-sigil-middleware' ;
14
14
15
+ import roomDirectoryRoutes from './room-directory-routes' ;
16
+ import roomRoutes from './room-routes' ;
17
+
15
18
const __dirname = path . dirname ( fileURLToPath ( import . meta. url ) ) ;
16
19
17
20
function installRoutes ( app ) {
@@ -66,10 +69,10 @@ function installRoutes(app) {
66
69
app . use ( '/img' , express . static ( path . join ( __dirname , '../../public/img' ) ) ) ;
67
70
app . use ( '/js' , express . static ( path . join ( __dirname , '../../dist/' ) ) ) ;
68
71
69
- app . use ( '/' , require ( './room-directory-routes' ) ) ;
72
+ app . use ( '/' , roomDirectoryRoutes ) ;
70
73
71
74
// For room aliases (/r) or room ID's (/roomid)
72
- app . use ( '/:entityDescriptor(r|roomid)/:roomIdOrAliasDirty' , require ( './room-routes' ) ) ;
75
+ app . use ( '/:entityDescriptor(r|roomid)/:roomIdOrAliasDirty' , roomRoutes ) ;
73
76
74
77
// Since everything after the hash (`#`) won't make it to the server, let's serve a 404
75
78
// page that will potentially redirect them to the correct place if they tried
You can’t perform that action at this time.
0 commit comments