completed adding MediaLofi for kontor-gin
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 3s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 3s
This commit is contained in:
@@ -2,6 +2,7 @@ package repository
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"kontor-api-gin/internal/models"
|
||||
"log/slog"
|
||||
|
||||
@@ -26,14 +27,19 @@ func (repository *MediaActorRepository) FindAll(context context.Context) ([]mode
|
||||
return actors, nil
|
||||
}
|
||||
|
||||
func (repository *MediaActorRepository) GetById(context context.Context, id string) (models.MediaActor, error) {
|
||||
func (repository *MediaActorRepository) GetById(context context.Context, id string) (*models.MediaActor, error) {
|
||||
var actor = models.MediaActor{ID: id}
|
||||
slog.Info("MediaActorRepository#GetById", "id", id)
|
||||
result := repository.db.First(&actor)
|
||||
if result.Error != nil {
|
||||
slog.Info("SportRepository#GetById", "error", result.Error.Error())
|
||||
}
|
||||
return actor, result.Error
|
||||
return &actor, result.Error
|
||||
}
|
||||
|
||||
func (repository *MediaActorRepository) Add(context context.Context, url string) (*models.MediaActor, error) {
|
||||
slog.Info("MediaActorRepository#Add", "url", url)
|
||||
return nil, fmt.Errorf("unimplemented method MediaFileRepository#Add")
|
||||
}
|
||||
|
||||
func (repository *MediaActorRepository) Delete(context context.Context, id string) error {
|
||||
|
||||
Reference in New Issue
Block a user