fix: improvement logs and record news access

This commit is contained in:
ericprd
2025-03-20 11:11:08 +08:00
parent 290d7f6701
commit d8f6968f64
13 changed files with 81 additions and 25 deletions
+3 -2
View File
@@ -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 {
+1 -1
View File
@@ -11,7 +11,7 @@ type accessor struct {
}
type Log interface {
CreateLogAds(logsdomain.LogsSpec) error
CreateLog(logsdomain.LogsSpec) error
GetAllLogAds(string) ([]adsdomain.Ads, error)
}