feat: move some service declarations to core
All checks were successful
Build and Push Docker Image / Build-And-Push-Docker-Image (push) Successful in 1m18s
All checks were successful
Build and Push Docker Image / Build-And-Push-Docker-Image (push) Successful in 1m18s
This commit is contained in:
@@ -7,7 +7,6 @@ import (
|
||||
"log/slog"
|
||||
"spend-sparrow/internal/auth_types"
|
||||
"spend-sparrow/internal/core"
|
||||
"spend-sparrow/internal/service"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/jmoiron/sqlx"
|
||||
@@ -45,7 +44,7 @@ func (s ServiceImpl) Add(ctx context.Context, user *auth_types.User, name string
|
||||
return nil, core.ErrInternal
|
||||
}
|
||||
|
||||
err = service.ValidateString(name, "name")
|
||||
err = core.ValidateString(name, "name")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -81,7 +80,7 @@ func (s ServiceImpl) UpdateName(ctx context.Context, user *auth_types.User, id s
|
||||
if user == nil {
|
||||
return nil, core.ErrUnauthorized
|
||||
}
|
||||
err := service.ValidateString(name, "name")
|
||||
err := core.ValidateString(name, "name")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user