fix: create and get news
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user