♻️ Regenerate client to use UUID instead of id integers and update frontend (#1281)

This commit is contained in:
Abdul
2024-08-01 11:48:00 -07:00
committed by GitHub
parent 19049f2a74
commit 36767344aa
5 changed files with 80 additions and 41 deletions

View File

@@ -1,9 +1,9 @@
import axios from "axios"
import type {
AxiosError,
AxiosInstance,
AxiosRequestConfig,
AxiosResponse,
AxiosInstance,
} from "axios"
import { ApiError } from "./ApiError"
@@ -151,12 +151,12 @@ export const getHeaders = async (
)
if (isStringWithValue(token)) {
headers["Authorization"] = `Bearer ${token}`
headers.Authorization = `Bearer ${token}`
}
if (isStringWithValue(username) && isStringWithValue(password)) {
const credentials = base64(`${username}:${password}`)
headers["Authorization"] = `Basic ${credentials}`
headers.Authorization = `Basic ${credentials}`
}
if (options.body !== undefined) {