Add Luxsin curve API client and validation functionality
- Introduced a new module `curve_client.py` for interacting with the Luxsin curve API, including functions for custom Base64 decoding and parametric EQ validation. - Implemented error handling for API responses and validation checks for curve data. - Removed outdated test files to streamline the codebase. - Updated brand creation and update logic in `brands.py` to ensure brand names are validated and checked for duplicates. - Enhanced model handling in `models.py` with new validation and push-to-search functionality, integrating curve validation before pushing to Meilisearch. - Updated frontend components to support new validation and push processes, including user feedback for validation results and progress tracking. - Changed favicon to SVG format for better scalability and appearance.
This commit is contained in:
@@ -72,13 +72,29 @@ export function deleteModel(id) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 推送到 Meilisearch
|
||||
* 推送前校验曲线数据
|
||||
* @param {Array<number>} modelIds - 型号 ID 列表
|
||||
*/
|
||||
export function validatePushToMeilisearch(modelIds) {
|
||||
return request({
|
||||
url: '/models/push-to-search/validate',
|
||||
method: 'post',
|
||||
data: { model_ids: modelIds },
|
||||
timeout: 120000,
|
||||
skipErrorToast: true
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 推送到 Meilisearch(需先通过校验)
|
||||
* @param {Array<number>} modelIds - 型号 ID 列表
|
||||
*/
|
||||
export function pushToMeilisearch(modelIds) {
|
||||
return request({
|
||||
url: '/models/push-to-search',
|
||||
method: 'post',
|
||||
data: { model_ids: modelIds }
|
||||
data: { model_ids: modelIds },
|
||||
timeout: 60000,
|
||||
skipErrorToast: true
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user