Auto-commit 2026-04-27 19:13

This commit is contained in:
2026-04-27 19:13:03 -04:00
parent c1fc21702c
commit 35d47733ea
10 changed files with 915 additions and 119 deletions

View File

@@ -123,11 +123,20 @@ func contactEditCmd() *cobra.Command {
address, _ := cmd.Flags().GetString("address")
notes, _ := cmd.Flags().GetString("notes")
req := contact.UpdateContactRequest{
Name: &name,
Phone: &phone,
Address: &address,
Notes: &notes,
req := contact.UpdateContactRequest{}
// Only set pointer fields when the flag was explicitly changed
if cmd.Flags().Changed("name") {
req.Name = &name
}
if cmd.Flags().Changed("phone") {
req.Phone = &phone
}
if cmd.Flags().Changed("address") {
req.Address = &address
}
if cmd.Flags().Changed("notes") {
req.Notes = &notes
}
updated, err := manager.Update(id, req)