frontend: rename ParticipantTokenService to ParticipantService
This commit is contained in:
parent
083350b402
commit
5f672c86b3
@ -5,7 +5,7 @@ import {
|
||||
AuthService,
|
||||
GlobalPreferencesService,
|
||||
NavigationService,
|
||||
ParticipantTokenService,
|
||||
ParticipantService,
|
||||
RecordingManagerService,
|
||||
RoomService
|
||||
} from '@lib/services';
|
||||
@ -55,7 +55,7 @@ export const checkParticipantRoleAndAuthGuard: CanActivateFn = async (
|
||||
const authService = inject(AuthService);
|
||||
const preferencesService = inject(GlobalPreferencesService);
|
||||
const roomService = inject(RoomService);
|
||||
const participantService = inject(ParticipantTokenService);
|
||||
const participantService = inject(ParticipantService);
|
||||
|
||||
// Get the role that the participant will have in the room based on the room ID and secret
|
||||
let participantRole: ParticipantRole;
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
import { inject } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot, CanActivateFn } from '@angular/router';
|
||||
import { ErrorReason } from '@lib/models';
|
||||
import { NavigationService, ParticipantTokenService, RoomService, SessionStorageService } from '@lib/services';
|
||||
import { NavigationService, ParticipantService, RoomService, SessionStorageService } from '@lib/services';
|
||||
import { WebComponentProperty } from '@lib/typings/ce/webcomponent/properties.model';
|
||||
|
||||
export const extractRoomQueryParamsGuard: CanActivateFn = (route: ActivatedRouteSnapshot) => {
|
||||
const navigationService = inject(NavigationService);
|
||||
const roomService = inject(RoomService);
|
||||
const participantService = inject(ParticipantTokenService);
|
||||
const participantService = inject(ParticipantService);
|
||||
const sessionStorageService = inject(SessionStorageService);
|
||||
|
||||
const { roomId, participantName, secret, leaveRedirectUrl, showOnlyRecordings } = extractParams(route);
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { inject } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot, CanActivateFn, RouterStateSnapshot } from '@angular/router';
|
||||
import { ErrorReason } from '@lib/models';
|
||||
import { NavigationService, ParticipantTokenService, RecordingManagerService, RoomService } from '@lib/services';
|
||||
import { NavigationService, ParticipantService, RecordingManagerService, RoomService } from '@lib/services';
|
||||
|
||||
/**
|
||||
* Guard to validate the access to recordings of a room by generating a recording token.
|
||||
@ -53,7 +53,7 @@ export const validateRoomAccessGuard: CanActivateFn = async (
|
||||
_state: RouterStateSnapshot
|
||||
) => {
|
||||
const roomService = inject(RoomService);
|
||||
const participantTokenService = inject(ParticipantTokenService);
|
||||
const participantTokenService = inject(ParticipantService);
|
||||
const navigationService = inject(NavigationService);
|
||||
|
||||
const roomId = roomService.getRoomId();
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
import { HttpErrorResponse, HttpEvent, HttpHandlerFn, HttpInterceptorFn, HttpRequest } from '@angular/common/http';
|
||||
import { inject } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { AuthService, ParticipantTokenService, RecordingManagerService, RoomService } from '@lib/services';
|
||||
import { AuthService, ParticipantService, RecordingManagerService, RoomService } from '@lib/services';
|
||||
import { catchError, from, Observable, switchMap } from 'rxjs';
|
||||
|
||||
export const httpInterceptor: HttpInterceptorFn = (req: HttpRequest<unknown>, next: HttpHandlerFn) => {
|
||||
const router: Router = inject(Router);
|
||||
const authService: AuthService = inject(AuthService);
|
||||
const roomService = inject(RoomService);
|
||||
const participantTokenService = inject(ParticipantTokenService);
|
||||
const participantTokenService = inject(ParticipantService);
|
||||
const recordingService = inject(RecordingManagerService);
|
||||
|
||||
const pageUrl = router.getCurrentNavigation()?.finalUrl?.toString() || router.url;
|
||||
|
||||
@ -22,7 +22,7 @@ import {
|
||||
MeetingService,
|
||||
NavigationService,
|
||||
NotificationService,
|
||||
ParticipantTokenService,
|
||||
ParticipantService,
|
||||
RecordingManagerService,
|
||||
RoomService,
|
||||
SessionStorageService,
|
||||
@ -31,7 +31,6 @@ import {
|
||||
import {
|
||||
LeftEventReason,
|
||||
MeetRoom,
|
||||
MeetRoomPreferences,
|
||||
ParticipantRole,
|
||||
WebComponentEvent,
|
||||
WebComponentOutboundEventMessage
|
||||
@ -43,13 +42,13 @@ import {
|
||||
} from '@lib/typings/ce/event.model';
|
||||
import {
|
||||
ApiDirectiveModule,
|
||||
ParticipantService as ComponentParticipantService,
|
||||
DataPacket_Kind,
|
||||
OpenViduComponentsUiModule,
|
||||
OpenViduService,
|
||||
ParticipantLeftEvent,
|
||||
ParticipantLeftReason,
|
||||
ParticipantModel,
|
||||
ParticipantService,
|
||||
RecordingStartRequestedEvent,
|
||||
RecordingStopRequestedEvent,
|
||||
RemoteParticipant,
|
||||
@ -108,14 +107,14 @@ export class MeetingComponent implements OnInit {
|
||||
constructor(
|
||||
protected route: ActivatedRoute,
|
||||
protected navigationService: NavigationService,
|
||||
protected participantTokenService: ParticipantTokenService,
|
||||
protected participantTokenService: ParticipantService,
|
||||
protected recManagerService: RecordingManagerService,
|
||||
protected authService: AuthService,
|
||||
protected roomService: RoomService,
|
||||
protected meetingService: MeetingService,
|
||||
protected openviduService: OpenViduService,
|
||||
protected participantService: ParticipantTokenService,
|
||||
protected componentParticipantService: ParticipantService,
|
||||
protected participantService: ParticipantService,
|
||||
protected componentParticipantService: ComponentParticipantService,
|
||||
protected appDataService: AppDataService,
|
||||
protected wcManagerService: WebComponentManagerService,
|
||||
protected sessionStorageService: SessionStorageService,
|
||||
|
||||
@ -3,7 +3,7 @@ export * from './http.service';
|
||||
export * from './auth.service';
|
||||
export * from './global-preferences.service';
|
||||
export * from './room.service';
|
||||
export * from './participant-token.service';
|
||||
export * from './participant.service';
|
||||
export * from './meeting.service';
|
||||
export * from './feature-configuration.service';
|
||||
export * from './recording-manager.service';
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { HttpService, ParticipantTokenService } from '@lib/services';
|
||||
import { HttpService, ParticipantService } from '@lib/services';
|
||||
import { LoggerService } from 'openvidu-components-angular';
|
||||
|
||||
@Injectable({
|
||||
@ -13,7 +13,7 @@ export class MeetingService {
|
||||
constructor(
|
||||
protected loggerService: LoggerService,
|
||||
protected httpService: HttpService,
|
||||
protected participantService: ParticipantTokenService
|
||||
protected participantService: ParticipantService
|
||||
) {
|
||||
this.log = this.loggerService.get('OpenVidu Meet - MeetingService');
|
||||
}
|
||||
@ -51,11 +51,7 @@ export class MeetingService {
|
||||
* @param participantId - The unique identifier of the participant whose role is to be changed
|
||||
* @param newRole - The new role to be assigned to the participant
|
||||
*/
|
||||
async changeParticipantRole(
|
||||
roomId: string,
|
||||
participantId: string,
|
||||
newRole: string
|
||||
): Promise<void> {
|
||||
async changeParticipantRole(roomId: string, participantId: string, newRole: string): Promise<void> {
|
||||
const path = `${this.MEETINGS_API}/${roomId}/participants/${participantId}`;
|
||||
const headers = this.participantService.getParticipantRoleHeader();
|
||||
const body = { role: newRole };
|
||||
|
||||
@ -8,7 +8,7 @@ import { LoggerService } from 'openvidu-components-angular';
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class ParticipantTokenService {
|
||||
export class ParticipantService {
|
||||
protected readonly PARTICIPANTS_API = `${HttpService.INTERNAL_API_PATH_PREFIX}/participants`;
|
||||
|
||||
protected participantName?: string;
|
||||
@ -1,7 +1,7 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { ShareRecordingDialogComponent } from '@lib/components';
|
||||
import { AuthService, HttpService, ParticipantTokenService } from '@lib/services';
|
||||
import { AuthService, HttpService, ParticipantService } from '@lib/services';
|
||||
import { MeetRecordingFilters, MeetRecordingInfo, RecordingPermissions } from '@lib/typings/ce';
|
||||
import { getValidDecodedToken } from '@lib/utils';
|
||||
import { LoggerService } from 'openvidu-components-angular';
|
||||
@ -23,7 +23,7 @@ export class RecordingManagerService {
|
||||
constructor(
|
||||
protected loggerService: LoggerService,
|
||||
private httpService: HttpService,
|
||||
protected participantService: ParticipantTokenService,
|
||||
protected participantService: ParticipantService,
|
||||
protected authService: AuthService,
|
||||
protected dialog: MatDialog
|
||||
) {
|
||||
|
||||
@ -1,10 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {
|
||||
FeatureConfigurationService,
|
||||
HttpService,
|
||||
ParticipantTokenService,
|
||||
SessionStorageService
|
||||
} from '@lib/services';
|
||||
import { FeatureConfigurationService, HttpService, ParticipantService, SessionStorageService } from '@lib/services';
|
||||
import {
|
||||
MeetRoom,
|
||||
MeetRoomFilters,
|
||||
@ -30,7 +25,7 @@ export class RoomService {
|
||||
constructor(
|
||||
protected loggerService: LoggerService,
|
||||
protected httpService: HttpService,
|
||||
protected participantService: ParticipantTokenService,
|
||||
protected participantService: ParticipantService,
|
||||
protected featureConfService: FeatureConfigurationService,
|
||||
protected sessionStorageService: SessionStorageService
|
||||
) {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { MeetingService, ParticipantTokenService, RoomService } from '@lib/services';
|
||||
import { MeetingService, ParticipantService, RoomService } from '@lib/services';
|
||||
import {
|
||||
WebComponentCommand,
|
||||
WebComponentEvent,
|
||||
@ -26,7 +26,7 @@ export class WebComponentManagerService {
|
||||
|
||||
constructor(
|
||||
protected loggerService: LoggerService,
|
||||
protected participantService: ParticipantTokenService,
|
||||
protected participantService: ParticipantService,
|
||||
protected openviduService: OpenViduService,
|
||||
protected roomService: RoomService,
|
||||
protected meetingService: MeetingService
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user