chore: implement instruction compliance remediation
- Replace Go interface{} with any (Go 1.18+ standard)
- Add database indexes to frequently queried model fields
- Add JSDoc documentation to frontend API client methods
- Remove deprecated docker-compose version keys
- Add concurrency groups to all 25 GitHub Actions workflows
- Add YAML front matter and fix H1→H2 headings in docs
Coverage: Backend 85.5%, Frontend 87.73%
Security: No vulnerabilities detected
Refs: docs/plans/instruction_compliance_spec.md
This commit is contained in:
@@ -1,11 +1,19 @@
|
||||
import axios from 'axios';
|
||||
|
||||
/**
|
||||
* Pre-configured Axios instance for API communication.
|
||||
* Includes base URL, credentials, and timeout settings.
|
||||
*/
|
||||
const client = axios.create({
|
||||
baseURL: '/api/v1',
|
||||
withCredentials: true, // Required for HttpOnly cookie transmission
|
||||
timeout: 30000, // 30 second timeout
|
||||
});
|
||||
|
||||
/**
|
||||
* Sets or clears the Authorization header for API requests.
|
||||
* @param token - JWT token to set, or null to clear authentication
|
||||
*/
|
||||
export const setAuthToken = (token: string | null) => {
|
||||
if (token) {
|
||||
client.defaults.headers.common.Authorization = `Bearer ${token}`;
|
||||
|
||||
Reference in New Issue
Block a user