From 7ba68d333bc20b5795ccfd3870546a05eee60470 Mon Sep 17 00:00:00 2001 From: T Date: Mon, 29 Sep 2025 15:04:44 -0600 Subject: Support for archiving clients and projects. --- internal/actions/clients.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'internal/actions/clients.go') diff --git a/internal/actions/clients.go b/internal/actions/clients.go index 10e8e7d..78b7934 100644 --- a/internal/actions/clients.go +++ b/internal/actions/clients.go @@ -115,3 +115,19 @@ func parseNameAndEmail(nameArg, emailArg string) (string, string) { } var emailAndNameRegex = regexp.MustCompile(`^(.+?)<([^>]+@[^>]+)>$`) + +func (a *actions) ArchiveClient(ctx context.Context, id int64) error { + err := a.queries.ArchiveClient(ctx, id) + if err != nil { + return fmt.Errorf("failed to archive client: %w", err) + } + return nil +} + +func (a *actions) UnarchiveClient(ctx context.Context, id int64) error { + err := a.queries.UnarchiveClient(ctx, id) + if err != nil { + return fmt.Errorf("failed to unarchive client: %w", err) + } + return nil +} -- cgit v1.2.3