From 6f63e998bb2895138663d7dd8855ebc15974baf6 Mon Sep 17 00:00:00 2001 From: Beau Cameron Date: Mon, 2 Oct 2023 16:26:41 -0600 Subject: [PATCH] Es Lint fix. --- packages/graph/cloud-communications/types.ts | 9 +++------ test/graph/cloud-communications.ts | 10 +++++----- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/packages/graph/cloud-communications/types.ts b/packages/graph/cloud-communications/types.ts index 155ee8356..8494c8750 100644 --- a/packages/graph/cloud-communications/types.ts +++ b/packages/graph/cloud-communications/types.ts @@ -16,7 +16,6 @@ export class _Presence extends _GraphInstance { * @param presence Presence object to set the state of a user's presence session */ public async setPresence(presence: ISetPresenceOptions): Promise { - const postBody = { ...presence }; return graphPost(Presence(this, "setPresence"), body(postBody)); } @@ -27,7 +26,6 @@ export class _Presence extends _GraphInstance { * @param sessionId Id of the application to clear presence */ public async clearPresence(sessionId: string): Promise { - const postBody = { sessionId }; return graphPost(Presence(this, "clearPresence"), body(postBody)); } @@ -59,18 +57,17 @@ export class _Presence extends _GraphInstance { } } -export interface IPresence extends _Presence { } +export interface IPresence extends _Presence {} export const Presence = graphInvokableFactory(_Presence); @defaultPath("communications") export class _Communications extends _GraphCollection { /** - * Retrieve presence information for a group of users. + * Retrieve presence information for a group of users * * @param ids An array of user id's to retrieve presence for. */ public async getPresencesByUserId(ids: string[]): Promise { - const postBody = { ids }; return graphPost(Communications(this, "getPresencesByUserId"), body(postBody)); } @@ -89,4 +86,4 @@ export interface ISetPresenceOptions extends IPresenceOptions { export interface IPresenceStatusMessage { message: ItemBody; expiryDateTime: DateTimeTimeZone; -} \ No newline at end of file +} diff --git a/test/graph/cloud-communications.ts b/test/graph/cloud-communications.ts index 2e82274e8..b1c9ad0e4 100644 --- a/test/graph/cloud-communications.ts +++ b/test/graph/cloud-communications.ts @@ -26,7 +26,7 @@ describe("Cloud-Communications", function () { const presence = await this.pnp.graph.communications.getPresencesByUserId([testUserId,testUserId]); return expect(presence.length).is.equals(2); }); - + it("Set User Presence", async function () { return expect(this.pnp.graph.users.getById(testUserId).presence.setPresence({ availability: "Busy", @@ -59,13 +59,13 @@ describe("Cloud-Communications", function () { return expect(this.pnp.graph.users.getById(testUserId).presence.setStatusMessage({ message:{ content: "Test Sample Message", - contentType: "text" + contentType: "text", }, expiryDateTime:{ dateTime: date.toISOString(), - timeZone: 'Pacific Standard Time' - } + timeZone: "Pacific Standard Time", + }, })).eventually.be.fulfilled; }); - + });