Skip to content

Commit

Permalink
Change user to saved_by
Browse files Browse the repository at this point in the history
  • Loading branch information
andriygm committed Oct 11, 2023
1 parent 9abe751 commit f2a6d45
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions cmd/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
}

Expand Down Expand Up @@ -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{
Expand All @@ -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,
})
}
Expand Down
2 changes: 1 addition & 1 deletion internal/meta/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion internal/storage/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f2a6d45

Please sign in to comment.