[mirotalksfu] - improve joinRoom

هذا الالتزام موجود في:
Miroslav Pejic
2022-02-17 08:43:45 +01:00
الأصل 160f54d56d
التزام 872762b6a9
3 ملفات معدلة مع 15 إضافات و11 حذوفات

عرض الملف

@@ -71,7 +71,9 @@ const view = {
app.use(cors());
app.use(compression());
app.use(express.json());
app.use(express.static(dir.public));
app.use(apiBasePath + '/docs', swaggerUi.serve, swaggerUi.setup(swaggerDocument)); // api docs
// Remove trailing slashes in url handle bad requests
app.use((err, req, res, next) => {
@@ -153,7 +155,7 @@ app.get('/join/', (req, res) => {
app.get('/join/*', (req, res) => {
if (hostCfg.authenticated) {
if (Object.keys(req.query).length > 0) {
log.debug('redirect:' + req.url + ' to ' + url.parse(req.url).pathname);
log.debug('Redirect:' + req.url + ' to ' + url.parse(req.url).pathname);
res.redirect(url.parse(req.url).pathname);
} else {
res.sendFile(view.room);
@@ -177,12 +179,6 @@ app.get(['/privacy'], (req, res) => {
// API
// ####################################################
// Api parse body data as json
app.use(express.json());
// api docs
app.use(apiBasePath + '/docs', swaggerUi.serve, swaggerUi.setup(swaggerDocument));
// request meeting room endpoint
app.post(['/api/v1/meeting'], (req, res) => {
// check if user was authorized for the api call