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

This commit is contained in:
2025-12-27 06:58:04 +01:00
parent ea2663a53d
commit 0325fe101c
8 changed files with 59 additions and 61 deletions

View File

@@ -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
}