frontend: Rename expirationDate to autoDeletionDate in room-related components and services for consistency
This commit is contained in:
parent
84d68ba31b
commit
b300425a2e
@ -54,7 +54,7 @@
|
||||
<div matListItemLine class="item-details">
|
||||
<div>
|
||||
<mat-icon class="icon">auto_delete</mat-icon>
|
||||
<p>Expires: {{ item.expirationDate | date: 'dd/MM/yyyy' }}</p>
|
||||
<p>Expires: {{ item.autoDeletionDate | date: 'dd/MM/yyyy' }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@ -74,7 +74,7 @@ export class RoomCreatorComponent implements OnInit {
|
||||
// TODO: Fix expiration date
|
||||
const options: MeetRoomOptions = {
|
||||
roomIdPrefix,
|
||||
expirationDate: Date.now() + 3600 * 1000 // 1 hour
|
||||
autoDeletionDate: Date.now() + 3600 * 1000 // 1 hour
|
||||
};
|
||||
|
||||
const room: MeetRoom = await this.httpService.createRoom(options);
|
||||
|
||||
@ -21,7 +21,7 @@ export class RoomService {
|
||||
// TODO: Improve expiration date
|
||||
const options: MeetRoomOptions = {
|
||||
roomIdPrefix: 'TestRoom-',
|
||||
expirationDate: Date.now() + 1000 * 60 * 60 // 1 hour from now
|
||||
autoDeletionDate: Date.now() + 1000 * 60 * 60 // 1 hour from now
|
||||
};
|
||||
this.log.d('Creating room', options);
|
||||
return this.httpService.createRoom(options);
|
||||
|
||||
@ -18,7 +18,7 @@ export const renderHomePage = async (req, res) => {
|
||||
export const createRoom = async (req, res) => {
|
||||
try {
|
||||
// Extract values from request body
|
||||
const { roomIdPrefix, expirationDate } = req.body
|
||||
const { roomIdPrefix, autoDeletionDate } = req.body
|
||||
|
||||
// Request to create a new room
|
||||
const response = await fetch(`${process.env.OPENVIDU_MEET_URL}/rooms`, {
|
||||
@ -26,7 +26,7 @@ export const createRoom = async (req, res) => {
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
roomIdPrefix,
|
||||
expirationDate: new Date(expirationDate).getTime()
|
||||
autoDeletionDate: new Date(autoDeletionDate).getTime()
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
@ -127,7 +127,7 @@
|
||||
>
|
||||
<input
|
||||
type="date"
|
||||
name="expirationDate"
|
||||
name="autoDeletionDate"
|
||||
id="expiration-date"
|
||||
class="form-control"
|
||||
required
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user