feat: testing mode banner + snapshot storage fields fix
This commit is contained in:
18
src/shared/store/TestingModeStore/api.ts
Normal file
18
src/shared/store/TestingModeStore/api.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
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;
|
||||
};
|
||||
Reference in New Issue
Block a user