backend: Change private methods to protected in OpenViduWebhookService for better accessibility
This commit is contained in:
parent
5671d58f1f
commit
4983729c1d
@ -51,7 +51,7 @@ export class OpenViduWebhookService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async sendWebhookEvent(event: MeetWebhookEventType, payload: MeetWebhookPayload) {
|
protected async sendWebhookEvent(event: MeetWebhookEventType, payload: MeetWebhookPayload) {
|
||||||
const webhookPreferences = await this.getWebhookPreferences();
|
const webhookPreferences = await this.getWebhookPreferences();
|
||||||
|
|
||||||
if (!webhookPreferences.enabled) return;
|
if (!webhookPreferences.enabled) return;
|
||||||
@ -83,14 +83,14 @@ export class OpenViduWebhookService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private generateWebhookSignature(timestamp: number, payload: object): string {
|
protected generateWebhookSignature(timestamp: number, payload: object): string {
|
||||||
return crypto
|
return crypto
|
||||||
.createHmac('sha256', MEET_API_KEY)
|
.createHmac('sha256', MEET_API_KEY)
|
||||||
.update(`${timestamp}.${JSON.stringify(payload)}`)
|
.update(`${timestamp}.${JSON.stringify(payload)}`)
|
||||||
.digest('hex');
|
.digest('hex');
|
||||||
}
|
}
|
||||||
|
|
||||||
private async fetchWithRetry(url: string, options: RequestInit, retries = 5, delay = 300): Promise<void> {
|
protected async fetchWithRetry(url: string, options: RequestInit, retries = 5, delay = 300): Promise<void> {
|
||||||
try {
|
try {
|
||||||
const response = await fetch(url, options);
|
const response = await fetch(url, options);
|
||||||
|
|
||||||
@ -109,7 +109,7 @@ export class OpenViduWebhookService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async getWebhookPreferences(): Promise<WebhookPreferences> {
|
protected async getWebhookPreferences(): Promise<WebhookPreferences> {
|
||||||
try {
|
try {
|
||||||
const { webhooksPreferences } = await this.globalPrefService.getGlobalPreferences();
|
const { webhooksPreferences } = await this.globalPrefService.getGlobalPreferences();
|
||||||
return webhooksPreferences;
|
return webhooksPreferences;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user