testapp: Refactor room-related terminology from 'roomName' to 'roomId' in homeController and views
This commit is contained in:
parent
c619760296
commit
675050b7a4
@ -18,14 +18,14 @@ export const renderHomePage = async (req, res) => {
|
|||||||
export const createRoom = async (req, res) => {
|
export const createRoom = async (req, res) => {
|
||||||
try {
|
try {
|
||||||
// Extract values from request body
|
// Extract values from request body
|
||||||
const { roomNamePrefix, expirationDate } = req.body
|
const { roomIdPrefix, expirationDate } = req.body
|
||||||
|
|
||||||
// Request to create a new room
|
// Request to create a new room
|
||||||
const response = await fetch(`${process.env.OPENVIDU_MEET_URL}/rooms`, {
|
const response = await fetch(`${process.env.OPENVIDU_MEET_URL}/rooms`, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: { 'Content-Type': 'application/json' },
|
headers: { 'Content-Type': 'application/json' },
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
roomNamePrefix,
|
roomIdPrefix,
|
||||||
expirationDate: new Date(expirationDate).getTime()
|
expirationDate: new Date(expirationDate).getTime()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@ -27,7 +27,7 @@
|
|||||||
<li
|
<li
|
||||||
class="list-group-item d-flex justify-content-between align-items-center"
|
class="list-group-item d-flex justify-content-between align-items-center"
|
||||||
>
|
>
|
||||||
<span>{{ roomName }}</span>
|
<span>{{ roomId }}</span>
|
||||||
<div class="dropdown">
|
<div class="dropdown">
|
||||||
<button
|
<button
|
||||||
class="btn btn-primary btn-sm dropdown-toggle"
|
class="btn btn-primary btn-sm dropdown-toggle"
|
||||||
@ -110,11 +110,11 @@
|
|||||||
|
|
||||||
<form action="/room" method="post">
|
<form action="/room" method="post">
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="room-name-prefix" class="form-label">Room Prefix</label>
|
<label for="room-id-prefix" class="form-label">Room Prefix</label>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
name="roomNamePrefix"
|
name="roomIdPrefix"
|
||||||
id="room-name-prefix"
|
id="room-id-prefix"
|
||||||
class="form-control"
|
class="form-control"
|
||||||
placeholder="e.g. Team meeting"
|
placeholder="e.g. Team meeting"
|
||||||
required
|
required
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user