feat: get news by slug and and author detail

This commit is contained in:
ericprd
2025-03-06 11:06:06 +08:00
parent d217ec8a62
commit 85247643e6
9 changed files with 76 additions and 1 deletions
+7
View File
@@ -0,0 +1,7 @@
package newssvc
import newsdomain "legalgo-BE-go/internal/domain/news"
func (i *impl) GetBySlug(slug string) (*newsdomain.News, error) {
return i.newsRepo.GetBySlug(slug)
}
+1
View File
@@ -15,6 +15,7 @@ type impl struct {
type News interface {
GetAll() ([]newsdomain.News, error)
GetBySlug(string) (*newsdomain.News, error)
Create(newsdomain.NewsReq, string) error
Delete(string) error
}