fix: show Laya model download progress and surface errors in Settings (#12)
Track download progress in layaService (bytes/total, phase, error state) and expose it through the laya status route. Render a progress bar during model download in Settings via a layaStatusPresentation service, and display download/status errors inline instead of failing silently. Cover progress tracking and status presentation with tests. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@ -17,7 +17,7 @@ router.get('/status', requireAuth, async (req, res) => {
|
||||
|
||||
router.post('/model/download', requireAuth, requireAdmin, async (req, res) => {
|
||||
try {
|
||||
res.json(await laya.downloadModel(req.body?.model));
|
||||
res.status(202).json(laya.startModelDownload(req.body?.model));
|
||||
} catch (error) {
|
||||
sendError(res, error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user