From b4dd6535a95cc4cf41159d635ee3305f02506499 Mon Sep 17 00:00:00 2001 From: tyboro2002 Date: Tue, 21 May 2024 11:49:20 +0200 Subject: [PATCH] chore: fix linter --- .../src/composables/services/admin.service.ts | 2 +- .../composables/services/assistant.service.ts | 48 ++++++++++++++++--- 2 files changed, 42 insertions(+), 8 deletions(-) diff --git a/frontend/src/composables/services/admin.service.ts b/frontend/src/composables/services/admin.service.ts index 71eec70a..b22d1608 100644 --- a/frontend/src/composables/services/admin.service.ts +++ b/frontend/src/composables/services/admin.service.ts @@ -36,7 +36,7 @@ export function useAdmin(): AdminState { admin, User.fromJSON, undefined, - selfprocessError + selfprocessError, ); } diff --git a/frontend/src/composables/services/assistant.service.ts b/frontend/src/composables/services/assistant.service.ts index dfb03185..7bd9e815 100644 --- a/frontend/src/composables/services/assistant.service.ts +++ b/frontend/src/composables/services/assistant.service.ts @@ -12,7 +12,7 @@ interface AssistantState { assistant: Ref; response: Ref; assistantPagination: Ref | null>; - getAssistantByID: (id: string, init?:boolean, selfprocessError?: boolean) => Promise; + getAssistantByID: (id: string, init?: boolean, selfprocessError?: boolean) => Promise; getAssistantsByCourse: (courseId: string, selfprocessError?: boolean) => Promise; getAssistants: (selfprocessError?: boolean) => Promise; searchAssistants: (filters: Filter, page: number, pageSize: number, selfprocessError?: boolean) => Promise; @@ -44,19 +44,53 @@ export function useAssistant(): AssistantState { await getList(endpoint, assistants, Assistant.fromJSON, selfprocessError); } - async function searchAssistants(filters: Filter, page: number, pageSize: number, selfprocessError: boolean = true): Promise { + async function searchAssistants( + filters: Filter, + page: number, + pageSize: number, + selfprocessError: boolean = true + ): Promise { const endpoint = endpoints.assistants.search; - await getPaginatedList(endpoint, filters, page, pageSize, assistantPagination, Assistant.fromJSON, selfprocessError); + await getPaginatedList( + endpoint, + filters, + page, + pageSize, + assistantPagination, + Assistant.fromJSON, + selfprocessError + ); } - async function assistantJoinCourse(courseId: string, assistantId: string, selfprocessError: boolean = true): Promise { + async function assistantJoinCourse( + courseId: string, + assistantId: string, + selfprocessError: boolean = true + ): Promise { const endpoint = endpoints.assistants.byCourse.replace('{courseId}', courseId); - await create(endpoint, { assistant: assistantId }, response, Response.fromJSON, undefined, selfprocessError); + await create( + endpoint, + { assistant: assistantId }, + response, + Response.fromJSON, + undefined, + selfprocessError + ); } - async function assistantLeaveCourse(courseId: string, assistantId: string, selfprocessError: boolean = true): Promise { + async function assistantLeaveCourse( + courseId: string, + assistantId: string, + selfprocessError: boolean = true + ): Promise { const endpoint = endpoints.assistants.byCourse.replace('{courseId}', courseId); - await deleteIdWithData(endpoint, { assistant: assistantId }, response, Response.fromJSON, selfprocessError); + await deleteIdWithData( + endpoint, + { assistant: assistantId }, + response, + Response.fromJSON, + selfprocessError + ); } async function createAssistant(user: User, selfprocessError: boolean = true): Promise {