frontend: Rename expirationDate to autoDeletionDate in room-related components and services for consistency

This commit is contained in:
Carlos Santos 2025-04-08 18:36:37 +02:00
parent 84d68ba31b
commit b300425a2e
5 changed files with 6 additions and 6 deletions

View File

@ -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>

View File

@ -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);

View File

@ -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);

View File

@ -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()
})
})

View File

@ -127,7 +127,7 @@
>
<input
type="date"
name="expirationDate"
name="autoDeletionDate"
id="expiration-date"
class="form-control"
required