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:
Dianaka123
2026-02-26 21:07:15 +03:00
parent c948179b5b
commit cf4104069e
3 changed files with 2 additions and 2 deletions

View File

@@ -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;

View File

@@ -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";