19 lines
540 B
TypeScript
19 lines
540 B
TypeScript
import { authInstance } from "@shared";
|
|
|
|
export type TestingModeResponse = {
|
|
enabled: boolean;
|
|
updated_at: string;
|
|
};
|
|
|
|
export const getTestingModeApi = async (): Promise<TestingModeResponse> => {
|
|
const response = await authInstance.get("/testing-mode");
|
|
return response.data as TestingModeResponse;
|
|
};
|
|
|
|
export const setTestingModeApi = async (request: {
|
|
enabled: boolean;
|
|
}): Promise<TestingModeResponse> => {
|
|
const response = await authInstance.post("/testing-mode", request);
|
|
return response.data as TestingModeResponse;
|
|
};
|