fix: save file info when updating version
- Add file_path, file_size, file_hash, entry_file to UpdateVersionRequest - Update these fields when saving version changes - Update originalUploadedData after successful save Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -367,6 +367,10 @@ func handleCreateVersionGlobal(c *gin.Context) {
|
||||
|
||||
type UpdateVersionRequest struct {
|
||||
Version string `json:"version"`
|
||||
FilePath string `json:"file_path"`
|
||||
FileSize int64 `json:"file_size"`
|
||||
FileHash string `json:"file_hash"`
|
||||
EntryFile string `json:"entry_file"`
|
||||
UpdateStrategy string `json:"update_strategy"`
|
||||
UpdateType string `json:"update_type"`
|
||||
UpdateMethod string `json:"update_method"`
|
||||
@@ -420,6 +424,16 @@ func handleUpdateVersionGlobal(c *gin.Context) {
|
||||
if req.Version != "" {
|
||||
updates["version"] = req.Version
|
||||
}
|
||||
if req.FilePath != "" {
|
||||
updates["file_path"] = req.FilePath
|
||||
}
|
||||
if req.FileSize > 0 {
|
||||
updates["file_size"] = req.FileSize
|
||||
}
|
||||
if req.FileHash != "" {
|
||||
updates["file_hash"] = req.FileHash
|
||||
}
|
||||
updates["entry_file"] = req.EntryFile
|
||||
if req.UpdateStrategy != "" {
|
||||
updates["update_strategy"] = req.UpdateStrategy
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user