Refactor: move tokenStorage into lib/api/
It only serves the API client — belongs with the HTTP layer. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { create } from "zustand";
|
||||
import { authApi } from "@/lib/api/auth";
|
||||
import { UserOut } from "@/types/user";
|
||||
import { saveTokens, getRefreshToken, clearTokens, loadFromStorage } from "@/lib/tokenStorage";
|
||||
import { saveTokens, getRefreshToken, clearTokens, loadFromStorage } from "@/lib/api/tokenStorage";
|
||||
|
||||
interface AuthState {
|
||||
user: UserOut | null;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import axios from "axios";
|
||||
import { getAccessToken, getRefreshToken, saveTokens, clearTokens } from "@/lib/tokenStorage";
|
||||
import { getAccessToken, getRefreshToken, saveTokens, clearTokens } from "./tokenStorage";
|
||||
|
||||
const BASE_URL = process.env.NEXT_PUBLIC_API_URL ?? "http://localhost:8000/api/v1";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user