From bb86d4b3077b11e785f4fde9742ec8f39e5c73e5 Mon Sep 17 00:00:00 2001 From: khanhtranduy <130121475+khanhtranduy@users.noreply.github.com> Date: Wed, 24 Jul 2024 18:28:37 +0700 Subject: [PATCH] Fix prettier checks --- backoffice/common/services/ApiClientService.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/backoffice/common/services/ApiClientService.ts b/backoffice/common/services/ApiClientService.ts index bdfdf70ceb..0b9e644f9c 100644 --- a/backoffice/common/services/ApiClientService.ts +++ b/backoffice/common/services/ApiClientService.ts @@ -6,7 +6,12 @@ interface RequestOptions { body?: string; } -const sendRequest = async (method: string, endpoint: string, data: any = null, contentType: string | null = null) => { +const sendRequest = async ( + method: string, + endpoint: string, + data: any = null, + contentType: string | null = null +) => { const defaultContentType = 'application/json; charset=UTF-8'; const requestOptions: RequestOptions = { method: method.toUpperCase(), @@ -39,8 +44,10 @@ const sendRequest = async (method: string, endpoint: string, data: any = null, c const apiClientService = { get: (endpoint: string) => sendRequest('GET', endpoint), - post: (endpoint: string, data: any, contentType: any | null = null) => sendRequest('POST', endpoint, data, contentType), - put: (endpoint: string, data: any, contentType: any | null = null) => sendRequest('PUT', endpoint, data, contentType), + post: (endpoint: string, data: any, contentType: any | null = null) => + sendRequest('POST', endpoint, data, contentType), + put: (endpoint: string, data: any, contentType: any | null = null) => + sendRequest('PUT', endpoint, data, contentType), delete: (endpoint: string) => sendRequest('DELETE', endpoint), };