mirror of
https://github.com/Xevion/xevion.dev.git
synced 2026-01-31 20:26:28 -06:00
refactor: reorganize Rust codebase into modular handlers and database layers
- Split monolithic src/db.rs (1122 lines) into domain modules: projects, tags, settings - Extract API handlers from main.rs into separate handler modules by domain - Add proxy module for ISR/SSR coordination with Bun process - Introduce AppState for shared application context - Add utility functions for asset serving and request classification - Remove obsolete middleware/auth.rs in favor of session checks in handlers
This commit is contained in:
@@ -19,7 +19,7 @@ export async function apiFetch<T>(
|
||||
|
||||
const url = `${baseUrl}${path}`;
|
||||
const method = init?.method ?? "GET";
|
||||
|
||||
|
||||
// Unix sockets require Bun's native fetch (SvelteKit's fetch doesn't support it)
|
||||
const fetchFn = isUnixSocket ? fetch : (init?.fetch ?? fetch);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user