Commit graph

16 commits

Author SHA1 Message Date
silentoplayz
fe28097817 feat: refactor model import to a single backend endpoint
This refactors the model import functionality to improve performance and user experience by centralizing the logic on the backend.

Previously, the frontend would parse an imported JSON file and send an individual API request for each model, which was slow and inefficient.

This change introduces a new backend endpoint, `/api/v1/models/import`, that accepts a list of model objects. The frontend now reads the selected JSON file, parses it, and sends the entire payload to the backend in a single request. The backend then processes this list, creating or updating models as necessary.

This commit also includes the following fixes:
- Handles cases where the imported JSON contains models without `meta` or `params` fields by providing default empty values.
2025-09-28 18:49:42 -04:00
silentoplayz
231d182c35 feat: move JSON model import to backend
This moves the JSON model import functionality to the backend. Instead of the frontend parsing the JSON file and sending multiple requests, it now uploads the file to a new endpoint (/api/v1/models/import), which processes the file and imports the models. This improves efficiency and provides better user feedback.
2025-09-28 18:09:58 -04:00
Jesper Kristensen
20c1c3f66b
Changed console logging of errors to use console error logging 2025-05-15 21:35:07 +02:00
Timothy Jaeryang Baek
d6c82939e6 refac 2025-01-29 21:56:28 -08:00
Timothy Jaeryang Baek
7966367107 refac: models api 2024-11-19 18:45:26 -08:00
Timothy Jaeryang Baek
9d9a60afec refac 2024-11-19 16:50:45 -08:00
Timothy Jaeryang Baek
8aa2d09cee chore: format 2024-11-19 12:22:58 -08:00
Timothy Jaeryang Baek
81bb2750e0 enh: reset models 2024-11-19 11:03:36 -08:00
Timothy Jaeryang Baek
c338f2cae1 chore: format 2024-11-16 23:46:12 -08:00
Timothy Jaeryang Baek
7f8c70b04a wip: admin models setting 2024-11-15 18:53:50 -08:00
Timothy Jaeryang Baek
9dae7d0572 refac: models 2024-11-15 18:21:41 -08:00
Timothy Jaeryang Baek
d9dc04f1a1 refac: frontend 2024-11-15 02:05:43 -08:00
Timothy J. Baek
6c8997fcbc fix 2024-05-25 14:24:00 -07:00
Timothy J. Baek
afcab78cab fix: models 2024-05-25 13:48:45 -07:00
Timothy J. Baek
e80e4c304a refac 2024-05-24 02:17:48 -07:00
Timothy J. Baek
4d57e08b38 feat: modelfiles to models 2024-05-24 00:26:00 -07:00
Renamed from src/lib/apis/modelfiles/index.ts (Browse further)