Skip to content

Commit

Permalink
e2e fix
Browse files Browse the repository at this point in the history
  • Loading branch information
matborowczyk committed Jan 30, 2025
1 parent 343ba0d commit b0eaa3f
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions src/Data/Managers/V2/helpers/useQueries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ export const usePost = (options?: { message?: string }) => {

await handleErrors(response);

if (response.headers.get("Content-Length") !== "0") {
const contentLength = response.headers.get("Content-Length");
if (contentLength && contentLength !== "0") {
return response.json();
}
} catch (error) {
Expand Down Expand Up @@ -154,7 +155,8 @@ export const usePostWithoutEnv = (options?: { message?: string }) => {

await handleErrors(response);

if (response.headers.get("Content-Length") !== "0") {
const contentLength = response.headers.get("Content-Length");
if (contentLength && contentLength !== "0") {
return response.json();
}

Expand Down Expand Up @@ -200,7 +202,8 @@ export const usePut = (options?: { message?: string }) => {

await handleErrors(response);

if (response.headers.get("Content-Length") !== "0") {
const contentLength = response.headers.get("Content-Length");
if (contentLength && contentLength !== "0") {
return response.json();
}
} catch (error) {
Expand Down Expand Up @@ -243,7 +246,8 @@ export const usePutWithoutEnv = (options?: { message?: string }) => {

await handleErrors(response);

if (response.headers.get("Content-Length") !== "0") {
const contentLength = response.headers.get("Content-Length");
if (contentLength && contentLength !== "0") {
return response.json();
}
} catch (error) {
Expand Down Expand Up @@ -287,7 +291,8 @@ export const usePatch = (options?: { message?: string }) => {

await handleErrors(response);

if (response.headers.get("Content-Length") !== "0") {
const contentLength = response.headers.get("Content-Length");
if (contentLength && contentLength !== "0") {
return response.json();
}
} catch (error) {
Expand Down Expand Up @@ -330,7 +335,8 @@ export const usePatchWithoutEnv = (options?: { message?: string }) => {

await handleErrors(response);

if (response.headers.get("Content-Length") !== "0") {
const contentLength = response.headers.get("Content-Length");
if (contentLength && contentLength !== "0") {
return response.json();
}
} catch (error) {
Expand Down Expand Up @@ -376,7 +382,8 @@ export const useDelete = (options?: { message?: string }) => {

await handleErrors(response);

if (response.headers.get("Content-Length") !== "0") {
const contentLength = response.headers.get("Content-Length");
if (contentLength && contentLength !== "0") {
return response.json();
}
} catch (error) {
Expand Down Expand Up @@ -417,7 +424,8 @@ export const useDeleteWithoutEnv = (options?: { message?: string }) => {

await handleErrors(response);

if (response.headers.get("Content-Length") !== "0") {
const contentLength = response.headers.get("Content-Length");
if (contentLength && contentLength !== "0") {
return response.json();
}
} catch (error) {
Expand Down

0 comments on commit b0eaa3f

Please sign in to comment.