refactor: enforce semantic values and numeric lint rules
This commit is contained in:
@@ -3,6 +3,8 @@ import createQueryClient from "openapi-react-query";
|
||||
|
||||
import type { paths } from "./generated/schema";
|
||||
|
||||
const HTTP_UNAUTHORIZED = 401;
|
||||
|
||||
const apiBaseUrl = import.meta.env.VITE_API_BASE_URL ?? "http://localhost:3000";
|
||||
|
||||
type AuthHandlers = {
|
||||
@@ -50,7 +52,7 @@ async function authenticatedFetch(request: Request): Promise<Response> {
|
||||
const retryRequest = authorized.clone();
|
||||
const response = await fetch(authorized);
|
||||
if (
|
||||
response.status !== 401 ||
|
||||
response.status !== HTTP_UNAUTHORIZED ||
|
||||
isAuthRequest ||
|
||||
!auth ||
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user