[mirotalk] - test

This commit is contained in:
Miroslav Pejic
2022-01-30 12:02:09 +01:00
parent 0c8d689297
commit d5293ada69
2 changed files with 4 additions and 4 deletions
+2 -1
View File
@@ -89,6 +89,7 @@ const turnUsername = process.env.TURN_USERNAME;
const turnCredential = process.env.TURN_PASSWORD;
const ServerApi = require('./ServerApi');
const { v4: uuidV4 } = require('uuid');
const Logger = require('./Logger');
const log = new Logger('server');
@@ -202,7 +203,7 @@ app.post([apiBasePath + '/meeting'], (req, res) => {
return res.status(403).json({ error: 'Unauthorized!' });
}
// setup meeting URL
let meetingURL = api.getMeetingURL();
let meetingURL = api.getMeetingURL(uuidV4());
res.setHeader('Content-Type', 'application/json');
res.end(JSON.stringify({ meeting: meetingURL }));
+2 -3
View File
@@ -20,8 +20,7 @@ module.exports = class ServerApi {
* Request meeting room endpoint
* @returns entrypoint / Room URL for your meeting.
*/
getMeetingURL() {
const { v4: uuidV4 } = require('uuid');
return 'http' + (this._host.includes('localhost') ? '' : 's') + '://' + this._host + '/join/' + uuidV4();
getMeetingURL(uuid) {
return 'http' + (this._host.includes('localhost') ? '' : 's') + '://' + this._host + '/join/' + uuid;
}
};