fix: use environment variable for API URL
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import API_URL from "../config/api";
|
||||
|
||||
import type { User } from "../types";
|
||||
|
||||
@@ -9,7 +10,7 @@ interface ApiUserResponse {
|
||||
|
||||
export function useGetCurrentUser() {
|
||||
async function getCurrentUser(): Promise<ApiUserResponse> {
|
||||
const response = await fetch("http://127.0.0.1:8000/api/me", {
|
||||
const response = await fetch(`${API_URL}/api/me`, {
|
||||
method: "GET",
|
||||
headers: {
|
||||
Accept: "application/json",
|
||||
|
||||
Reference in New Issue
Block a user