From f948370bef6aa326a1c30fc04e2bb555ec50916d Mon Sep 17 00:00:00 2001 From: nicolas Date: Wed, 28 Jul 2021 22:05:37 +0200 Subject: [PATCH] Fixed codacy issues --- lib/videoClient.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/videoClient.ts b/lib/videoClient.ts index 755c0cda20..e4a5e6867a 100644 --- a/lib/videoClient.ts +++ b/lib/videoClient.ts @@ -11,6 +11,7 @@ import logger from "@lib/logger"; import { AdditionInformation, EntryPoint } from "@lib/emails/EventMail"; import { getIntegrationName } from "@lib/emails/helpers"; import CalEventParser from "@lib/CalEventParser"; +import { Credential } from "@prisma/client"; const log = logger.getChildLogger({ prefix: ["[lib] videoClient"] }); @@ -86,7 +87,7 @@ interface VideoApiAdapter { updateMeeting(uid: string, event: CalendarEvent); - deleteMeeting(uid: string); + deleteMeeting(uid: string): Promise; getAvailability(dateFrom, dateTo): Promise; } @@ -197,13 +198,13 @@ const videoIntegrations = (withCredentials): VideoApiAdapter[] => }) .filter(Boolean); -const getBusyVideoTimes = (withCredentials) => +const getBusyVideoTimes: (withCredentials) => Promise = (withCredentials) => Promise.all(videoIntegrations(withCredentials).map((c) => c.getAvailability())).then((results) => results.reduce((acc, availability) => acc.concat(availability), []) ); const createMeeting = async ( - credential, + credential: Credential, calEvent: CalendarEvent, maybeUid: string = null ): Promise => { @@ -317,7 +318,7 @@ const updateMeeting = async ( }; }; -const deleteMeeting = (credential, uid: string): Promise => { +const deleteMeeting = (credential: Credential, uid: string): Promise => { if (credential) { return videoIntegrations([credential])[0].deleteMeeting(uid); }