mirror of
https://github.com/warmbly/warmbly.git
synced 2026-09-05 16:02:48 +00:00
26 lines
844 B
Go
26 lines
844 B
Go
package group
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/google/uuid"
|
|
"github.com/warmbly/warmbly/internal/errx"
|
|
"github.com/warmbly/warmbly/internal/models"
|
|
)
|
|
|
|
func (s *groupService) Create(ctx context.Context, userID uuid.UUID, data *models.GroupCreate) (*models.Group, *errx.Error) {
|
|
return s.groupRepository.Create(ctx, userID, data)
|
|
}
|
|
|
|
func (s *groupService) Delete(ctx context.Context, userID, id uuid.UUID) *errx.Error {
|
|
return s.groupRepository.Delete(ctx, userID, id)
|
|
}
|
|
|
|
func (s *groupService) Move(ctx context.Context, userID, id uuid.UUID, position int32) ([]models.Order, *errx.Error) {
|
|
return s.groupRepository.Move(ctx, userID, id, position)
|
|
}
|
|
|
|
func (s *groupService) Update(ctx context.Context, userID, id uuid.UUID, data *models.GroupUpdate) (*models.Group, *errx.Error) {
|
|
return s.groupRepository.Update(ctx, userID, id, data)
|
|
}
|