Fix some lint error + change error handling
Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
@@ -920,13 +920,14 @@ type MoveCookieToCategoryResult struct {
|
||||
|
||||
func (s *Service) MoveCookieToCategory(
|
||||
ctx context.Context,
|
||||
scope coredata.Scoper,
|
||||
req MoveCookieToCategoryRequest,
|
||||
) (*MoveCookieToCategoryResult, error) {
|
||||
if err := req.Validate(); err != nil {
|
||||
return nil, fmt.Errorf("invalid request: %w", err)
|
||||
}
|
||||
|
||||
scope := coredata.NewScopeFromObjectID(req.SourceCookieCategoryID)
|
||||
|
||||
var result MoveCookieToCategoryResult
|
||||
|
||||
err := s.pg.WithTx(
|
||||
|
||||
Reference in New Issue
Block a user