Skip to content

Commit 5a21e09

Browse files
committed
Fix some inline requires
1 parent 4bbc400 commit 5a21e09

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

server/routes/install-routes.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ import identifyRoute from '../middleware/identify-route-middleware';
1212
import clientSideRoomAliasHashRedirectRoute from './client-side-room-alias-hash-redirect-route';
1313
import redirectToCorrectArchiveUrlIfBadSigil from '../middleware/redirect-to-correct-archive-url-if-bad-sigil-middleware';
1414

15+
import roomDirectoryRoutes from './room-directory-routes';
16+
import roomRoutes from './room-routes';
17+
1518
const __dirname = path.dirname(fileURLToPath(import.meta.url));
1619

1720
function installRoutes(app) {
@@ -66,10 +69,10 @@ function installRoutes(app) {
6669
app.use('/img', express.static(path.join(__dirname, '../../public/img')));
6770
app.use('/js', express.static(path.join(__dirname, '../../dist/')));
6871

69-
app.use('/', require('./room-directory-routes'));
72+
app.use('/', roomDirectoryRoutes);
7073

7174
// 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);
7376

7477
// Since everything after the hash (`#`) won't make it to the server, let's serve a 404
7578
// page that will potentially redirect them to the correct place if they tried

0 commit comments

Comments
 (0)