Enable adding/removing users to list as well as add/update list items #11

Merged
robin merged 15 commits from dev into main 2026-08-20 15:55:38 +02:00
2 changed files with 2 additions and 2 deletions
Showing only changes of commit dd8c105230 - Show all commits
+1 -1
View File
@@ -26,7 +26,7 @@ type ListRepository interface {
CreateList(ctx context.Context, name string, userIDs []string) (*List, error) CreateList(ctx context.Context, name string, userIDs []string) (*List, error)
AddUserToList(ctx context.Context, listID string, userID string) error AddUserToList(ctx context.Context, listID string, userID string) error
RemoveUserFromList(ctx context.Context, listID string, userID string) error RemoveUserFromList(ctx context.Context, listID string, userID string) error
AddListItem(ctx context.Context, listID string, title string) (*ListItem, error) CreateListItem(ctx context.Context, listID string, title string) (*ListItem, error)
UpdateListItem(ctx context.Context, listItemID string, title string, isCompleted bool) error UpdateListItem(ctx context.Context, listItemID string, title string, isCompleted bool) error
} }
+1 -1
View File
@@ -82,7 +82,7 @@ func (r *ListRepo) RemoveUserFromList(ctx context.Context, listID string, userID
return nil return nil
} }
func (r *ListRepo) AddListItem(ctx context.Context, listID string, title string) (*domain.ListItem, error) { func (r *ListRepo) CreateListItem(ctx context.Context, listID string, title string) (*domain.ListItem, error) {
l := &domain.ListItem{Title: title} l := &domain.ListItem{Title: title}
err := r.db.QueryRowContext(ctx, err := r.db.QueryRowContext(ctx,