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,14 +1,28 @@
|
||||
import client from './client'
|
||||
|
||||
/** Map of setting keys to string values. */
|
||||
export interface SettingsMap {
|
||||
[key: string]: string
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetches all application settings.
|
||||
* @returns Promise resolving to SettingsMap
|
||||
* @throws {AxiosError} If the request fails
|
||||
*/
|
||||
export const getSettings = async (): Promise<SettingsMap> => {
|
||||
const response = await client.get('/settings')
|
||||
return response.data
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a single application setting.
|
||||
* @param key - The setting key to update
|
||||
* @param value - The new value for the setting
|
||||
* @param category - Optional category for organization
|
||||
* @param type - Optional type hint for the setting
|
||||
* @throws {AxiosError} If the update fails
|
||||
*/
|
||||
export const updateSetting = async (key: string, value: string, category?: string, type?: string): Promise<void> => {
|
||||
await client.post('/settings', { key, value, category, type })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user