fix: 批量导入并发哈希并校正 CSV 行号
This commit is contained in:
@@ -649,3 +649,14 @@ func writeCSVValidationError(w http.ResponseWriter, errs []csvLineError) {
|
||||
Data: map[string]any{"errors": errs},
|
||||
})
|
||||
}
|
||||
|
||||
func writeCSVConflictError(w http.ResponseWriter, errs []csvLineError) {
|
||||
httpx.WriteJSON(w, http.StatusConflict, httpx.Envelope{
|
||||
OK: false,
|
||||
Error: &httpx.ErrorBody{
|
||||
Code: "id_taken",
|
||||
Message: "编号已占用",
|
||||
},
|
||||
Data: map[string]any{"errors": errs},
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user