fix: create and get news

This commit is contained in:
ericprd
2025-03-05 22:15:39 +08:00
parent dd109c8aa0
commit 5c699dfa53
22 changed files with 46 additions and 159 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ import (
newsdomain "legalgo-BE-go/internal/domain/news"
)
func (a *accessor) Create(spec *newsdomain.News) error {
func (a *accessor) Create(spec newsdomain.News) error {
if err := a.db.Create(&spec).Error; err != nil {
return fmt.Errorf("failed to create news: %w", err)
}