summaryrefslogtreecommitdiff
path: root/internal/actions/projects.go
diff options
context:
space:
mode:
authorT <t@tjp.lol>2025-09-29 15:04:44 -0600
committerT <t@tjp.lol>2025-09-30 11:40:45 -0600
commit7ba68d333bc20b5795ccfd3870546a05eee60470 (patch)
tree12dc4b017803b7d01844fd42b9e3be281cbbd986 /internal/actions/projects.go
parentbce8dbb58165e443902d9dae3909225ef42630c4 (diff)
Support for archiving clients and projects.HEADmain
Diffstat (limited to 'internal/actions/projects.go')
-rw-r--r--internal/actions/projects.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/internal/actions/projects.go b/internal/actions/projects.go
index d36780b..d085faa 100644
--- a/internal/actions/projects.go
+++ b/internal/actions/projects.go
@@ -79,3 +79,19 @@ func (a *actions) FindProject(ctx context.Context, nameOrID string) (*queries.Pr
return nil, fmt.Errorf("%w: %s matches multiple projects", ErrAmbiguousProject, nameOrID)
}
}
+
+func (a *actions) ArchiveProject(ctx context.Context, id int64) error {
+ err := a.queries.ArchiveProject(ctx, id)
+ if err != nil {
+ return fmt.Errorf("failed to archive project: %w", err)
+ }
+ return nil
+}
+
+func (a *actions) UnarchiveProject(ctx context.Context, id int64) error {
+ err := a.queries.UnarchiveProject(ctx, id)
+ if err != nil {
+ return fmt.Errorf("failed to unarchive project: %w", err)
+ }
+ return nil
+}