Fix issue #48: "Remember me" checkbox on login
Some checks failed
Test / test (push) Failing after 2s

This commit is contained in:
Gitea OpenCode Agent
2026-10-15 11:11:17 +00:00
parent 4faa585874
commit adb29d3ef6
10 changed files with 192 additions and 12 deletions

View File

@@ -1,4 +1,5 @@
import axios from 'axios';
import { GetToken } from './TokenStore';
const server = axios.create({
baseURL: 'http://localhost:5000/api', // fallback only
@@ -12,7 +13,7 @@ export const initApi = (baseURL) => {
};
server.interceptors.request.use((config) => {
const token = localStorage.getItem('token');
const token = GetToken();
if (token) {
config.headers.Authorization = `Bearer ${token}`;
}