Skip to content

Commit 79cb613

Browse files
committed
renaming status to apiStatus
1 parent a8f00a5 commit 79cb613

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

api-mock/fetcher.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { serializeVars } from "./utils";
55

66
const API_PORT = Number(process.env.API_PORT || 3030);
77

8-
let status: "NOT_READY" | "OK" = "NOT_READY";
8+
let apiStatus: "NOT_READY" | "OK" = "NOT_READY";
99
let stConfig: string;
1010

1111
type Callback = (
@@ -38,7 +38,7 @@ export function request(): ChainedRequest {
3838

3939
async function executeRequest(): Promise<void> {
4040
try {
41-
if (status === "NOT_READY") {
41+
if (apiStatus === "NOT_READY") {
4242
await initApp();
4343
}
4444
const response = await fetch(`http://localhost:${API_PORT}${path}`, {
@@ -136,7 +136,7 @@ export async function queryAPI({
136136
returnResponse?: boolean;
137137
skipInit?: boolean;
138138
}) {
139-
if (!skipInit && status === "NOT_READY") {
139+
if (!skipInit && apiStatus === "NOT_READY") {
140140
await initApp();
141141
}
142142
try {
@@ -164,7 +164,7 @@ export async function queryAPI({
164164
}
165165

166166
export function setMockStatus(newStatus: "NOT_READY" | "OK") {
167-
status = newStatus;
167+
apiStatus = newStatus;
168168
}
169169

170170
export function setMockConfig(config) {

0 commit comments

Comments
 (0)