fix: improvement logs and record news access
This commit is contained in:
@@ -7,10 +7,11 @@ import (
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
func (a *accessor) CreateLogAds(spec logsdomain.LogsSpec) error {
|
||||
newSpec := database.LogAds{
|
||||
func (a *accessor) CreateLog(spec logsdomain.LogsSpec) error {
|
||||
newSpec := database.ContentLog{
|
||||
ID: uuid.NewString(),
|
||||
ContentID: spec.ContentID,
|
||||
Category: spec.Category,
|
||||
}
|
||||
|
||||
if spec.UserID != nil {
|
||||
|
||||
@@ -11,7 +11,7 @@ type accessor struct {
|
||||
}
|
||||
|
||||
type Log interface {
|
||||
CreateLogAds(logsdomain.LogsSpec) error
|
||||
CreateLog(logsdomain.LogsSpec) error
|
||||
GetAllLogAds(string) ([]adsdomain.Ads, error)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user