format
This commit is contained in:
@@ -1,11 +1,19 @@
|
||||
import { apiFetch } from './client'
|
||||
import type { AuthResponse, ConnectionStatus, LoginRequest, ServiceType } from '../types/connection'
|
||||
import { apiFetch } from "./client";
|
||||
import type {
|
||||
AuthResponse,
|
||||
ConnectionStatus,
|
||||
LoginRequest,
|
||||
ServiceType,
|
||||
} from "../types/connection";
|
||||
|
||||
export const login = (req: LoginRequest) =>
|
||||
apiFetch<AuthResponse>('/login', { method: 'POST', body: JSON.stringify(req) })
|
||||
apiFetch<AuthResponse>("/login", {
|
||||
method: "POST",
|
||||
body: JSON.stringify(req),
|
||||
});
|
||||
|
||||
export const getStatuses = () =>
|
||||
apiFetch<ConnectionStatus[]>('/connections/status')
|
||||
apiFetch<ConnectionStatus[]>("/connections/status");
|
||||
|
||||
export const logout = (serviceType: ServiceType) =>
|
||||
apiFetch<void>(`/connections/${serviceType}`, { method: 'DELETE' })
|
||||
apiFetch<void>(`/connections/${serviceType}`, { method: "DELETE" });
|
||||
|
||||
Reference in New Issue
Block a user