diff --git a/cmd/status.go b/cmd/status.go index bf7c724..3089f36 100644 --- a/cmd/status.go +++ b/cmd/status.go @@ -20,7 +20,7 @@ func runStatusCmd(cmd *cobra.Command, args []string) error { FileSize uint64 `json:"fileSize"` FileHash string `json:"fileHash"` Timestamp string `json:"timestamp"` - User string `json:"user"` + SavedBy string `json:"savedBy"` Message string `json:"message"` } @@ -133,7 +133,7 @@ func runStatusCmd(cmd *cobra.Command, args []string) error { log.ColorFile(relPath), "", log.ColorFaint(humanize.Bytes(metadata.FileSize)), "", log.ColorFaint(timestamp), "", - log.ColorFaint(metadata.User), "", + log.ColorFaint(metadata.SavedBy), "", log.ColorFaint(metadata.Message), ) jsonLogger.Files = append(jsonLogger.Files, jsonFileResult{ @@ -142,7 +142,7 @@ func runStatusCmd(cmd *cobra.Command, args []string) error { FileSize: metadata.FileSize, FileHash: metadata.FileHash, Timestamp: timestamp, - User: metadata.User, + SavedBy: metadata.SavedBy, Message: metadata.Message, }) } diff --git a/internal/meta/file.go b/internal/meta/file.go index 588e79d..97b7336 100644 --- a/internal/meta/file.go +++ b/internal/meta/file.go @@ -11,7 +11,7 @@ type Metadata struct { FileSize uint64 `json:"file_size_bytes"` Timestamp time.Time `json:"timestamp"` Message string `json:"message"` - User string `json:"user"` + SavedBy string `json:"saved_by"` } // Creates a metadata file diff --git a/internal/storage/add.go b/internal/storage/add.go index 1374470..6a82f0c 100644 --- a/internal/storage/add.go +++ b/internal/storage/add.go @@ -87,7 +87,7 @@ func Add(localPath string, storageDir string, gitDir string, message string, dry FileHash: fileHash, FileSize: fileSize, Timestamp: time.Now(), - User: userName, + SavedBy: userName, Message: message, } err = meta.Save(metadata, localPath, dry)