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
@@ -0,0 +1,15 @@
package logssvc
import (
"fmt"
logsdomain "legalgo-BE-go/internal/domain/logs"
)
func (i *impl) CreateLogNews(spec logsdomain.LogsSpec) error {
spec.Category = "news"
if err := i.logsRepo.CreateLog(spec); err != nil {
return fmt.Errorf("failed to create news log: %v", err)
}
return nil
}