File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import { serializeVars } from "./utils";
5
5
6
6
const API_PORT = Number ( process . env . API_PORT || 3030 ) ;
7
7
8
- let status : "NOT_READY" | "OK" = "NOT_READY" ;
8
+ let apiStatus : "NOT_READY" | "OK" = "NOT_READY" ;
9
9
let stConfig : string ;
10
10
11
11
type Callback = (
@@ -38,7 +38,7 @@ export function request(): ChainedRequest {
38
38
39
39
async function executeRequest ( ) : Promise < void > {
40
40
try {
41
- if ( status === "NOT_READY" ) {
41
+ if ( apiStatus === "NOT_READY" ) {
42
42
await initApp ( ) ;
43
43
}
44
44
const response = await fetch ( `http://localhost:${ API_PORT } ${ path } ` , {
@@ -136,7 +136,7 @@ export async function queryAPI({
136
136
returnResponse ?: boolean ;
137
137
skipInit ?: boolean ;
138
138
} ) {
139
- if ( ! skipInit && status === "NOT_READY" ) {
139
+ if ( ! skipInit && apiStatus === "NOT_READY" ) {
140
140
await initApp ( ) ;
141
141
}
142
142
try {
@@ -164,7 +164,7 @@ export async function queryAPI({
164
164
}
165
165
166
166
export function setMockStatus ( newStatus : "NOT_READY" | "OK" ) {
167
- status = newStatus ;
167
+ apiStatus = newStatus ;
168
168
}
169
169
170
170
export function setMockConfig ( config ) {
You can’t perform that action at this time.
0 commit comments