diff --git a/frontend/src/hooks/api/actions/usePersonalAPITokensApi/usePersonalAPITokensApi.ts b/frontend/src/hooks/api/actions/usePersonalAPITokensApi/usePersonalAPITokensApi.ts index da3ab31afc..206aaaf030 100644 --- a/frontend/src/hooks/api/actions/usePersonalAPITokensApi/usePersonalAPITokensApi.ts +++ b/frontend/src/hooks/api/actions/usePersonalAPITokensApi/usePersonalAPITokensApi.ts @@ -37,38 +37,9 @@ export const usePersonalAPITokensApi = () => { } }; - const createUserPersonalAPIToken = async ( - userId: number, - payload: ICreatePersonalApiTokenPayload - ): Promise => { - const req = createRequest(`api/admin/user-admin/${userId}/pat`, { - method: 'POST', - body: JSON.stringify(payload), - }); - try { - const response = await makeRequest(req.caller, req.id); - return await response.json(); - } catch (e) { - throw e; - } - }; - - const deleteUserPersonalAPIToken = async (userId: number, id: string) => { - const req = createRequest(`api/admin/user-admin/${userId}/pat/${id}`, { - method: 'DELETE', - }); - try { - await makeRequest(req.caller, req.id); - } catch (e) { - throw e; - } - }; - return { createPersonalAPIToken, deletePersonalAPIToken, - createUserPersonalAPIToken, - deleteUserPersonalAPIToken, errors, loading, };