12 Commits
Author SHA1 Message Date
YumeMichi 683645be8e Fix session cleanup on error paths
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-07-13 08:03:01 +08:00
YumeMichi cb8f587e30 Unify error handling and HTTP statuses
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-07-11 16:18:17 +08:00
YumeMichi 4e642cc7c1 fixup! Correct package size calculation in batch download
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-06 18:40:03 +08:00
YumeMichi d8875490b6 Remove personal CDN override hacks
These CDN compatibility hacks are personal deployment adjustments and should not live in the public codebase.

Keep them in a separate personal branch when needed, while preserving only the generic 99_0_115.zip probe-and-append behavior in the shared branch.

Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-04 14:50:41 +08:00
YumeMichi e61c07a9a3 Reduce handler request boilerplate
- Add session.Attach to reuse per-request sessions across middleware and ghome handlers
- Make Session finalize/abort paths idempotent to avoid duplicate commit or rollback work
- Move request_data parsing helper to internal/utils
- Expand ParseRequestData usage across api, download, unit, live, multiunit, and subscenario handlers
- Extract download package metadata into internal/handler/download/types.go
- Return explicit errors from selected session lookup helpers and update callers
- Make api action handlers return errors directly instead of calling ss.CheckErr in nested layers

Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-04 03:05:32 +08:00
YumeMichi 674d904e84 Correct package size calculation in batch download
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-04 01:56:46 +08:00
YumeMichi b71dc7c6ae Make 99_0_115.zip optional
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-04 00:09:35 +08:00
YumeMichi 8d82d60ece Fix download/getUrl
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-01 22:51:26 +08:00
YumeMichi 897851a2eb Add support for package size override
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-01 21:48:41 +08:00
YumeMichi 8a7d7ccb93 Add support for server config override
Add settings.override_server_config with enable flag and per-platform
(Android/iOS) url + size fields.

Use this config in /download/update to override the fixed
99_0_115.zip package source when needed.

Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-01 21:48:41 +08:00
YumeMichi 150ce674ad Implement more endpoints & overhaul [2/n]
Drop LevelDB and move all the things to SQLite.

Implemented endpoints:
/api <unit, accessoryMaterialAll>
/api <unit, accessoryTab>
/live/continue
/live/partyList
/unit/favoriteAccessory (WIP)
/unit/sale

Signed-off-by: Sean Du <do4suki@gmail.com>
2026-04-28 11:44:56 +08:00
YumeMichi c77241a883 Overhaul [1/n]
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-01-29 02:42:28 +08:00