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
@@ -72,7 +72,7 @@ func Create(
return
}
if err := newsSvc.CreateModel(spec, staffProfile.ID); err != nil {
if err := newsSvc.Create(spec, staffProfile.ID); err != nil {
response.ResponseWithErrorCode(
ctx,
w,
+1 -1
View File
@@ -14,7 +14,7 @@ func GetAll(
) {
router.Get("/news", func(w http.ResponseWriter, r *http.Request) {
ctx := r.Context()
news, err := newsSvc.GetAllModel()
news, err := newsSvc.GetAll()
if err != nil {
response.ResponseWithErrorCode(
ctx,