REFACTOR: Deleted Redundant Repo Interfaces
Build, Push and Deploy CMS / build-push-deploy (push) Successful in 2m46s

This commit is contained in:
FahdShalhoub
2026-08-26 19:02:40 +03:00
parent 858b277c9d
commit 9d7e1825f1
3 changed files with 11 additions and 18 deletions
+3 -7
View File
@@ -8,17 +8,13 @@ import (
"thamanyah/cms/v2/internal/models"
)
type VideoRepository interface {
CreateVideo(ctx context.Context, v models.Video) (models.Video, error)
type VideoRepository struct {
SQLDB *sql.DB
}
var VideoRepo VideoRepository
type ConcreteVideoRepository struct {
SQLDB *sql.DB
}
func (svc ConcreteVideoRepository) CreateVideo(ctx context.Context, v models.Video) (models.Video, error) {
func (svc VideoRepository) CreateVideo(ctx context.Context, v models.Video) (models.Video, error) {
tx, err := svc.SQLDB.BeginTx(ctx, nil)
if err != nil {
return models.Video{}, err