extract common create and updatelogic
This commit is contained in:
@@ -4,8 +4,6 @@ import (
|
||||
"context"
|
||||
"queryorchestration/internal/database/repository"
|
||||
queryprocessor "queryorchestration/internal/queryProcessor"
|
||||
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
type Creator struct {
|
||||
@@ -20,13 +18,3 @@ func (s Creator) Validate(ctx context.Context, entity *queryprocessor.Create) er
|
||||
// TODO
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s Creator) Create(ctx context.Context, entity *queryprocessor.Create) (uuid.UUID, error) {
|
||||
err := s.Validate(ctx, entity)
|
||||
if err != nil {
|
||||
return uuid.Nil, err
|
||||
}
|
||||
|
||||
// TODO
|
||||
return uuid.Nil, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user