feat: update staff data

This commit is contained in:
ericprd
2025-03-14 12:41:11 +08:00
parent 1297c71200
commit 11bc19360c
31 changed files with 130 additions and 115 deletions
+3 -3
View File
@@ -4,8 +4,8 @@ import (
"fmt"
authmiddleware "legalgo-BE-go/internal/api/http/middleware/auth"
newsdomain "legalgo-BE-go/internal/domain/news"
authsvc "legalgo-BE-go/internal/services/auth"
newssvc "legalgo-BE-go/internal/services/news"
staffsvc "legalgo-BE-go/internal/services/staffsvc"
"legalgo-BE-go/internal/utilities/response"
"legalgo-BE-go/internal/utilities/utils"
"net/http"
@@ -16,7 +16,7 @@ import (
func Update(
router chi.Router,
newsSvc newssvc.News,
authSvc authsvc.Auth,
authSvc staffsvc.Auth,
) {
router.With(authmiddleware.Authorize()).
Put("/news/{news_id}/update", func(w http.ResponseWriter, r *http.Request) {
@@ -48,7 +48,7 @@ func Update(
return
}
staff, err := authSvc.GetStaffProfile(destructedToken.Email)
staff, err := authSvc.GetProfile(destructedToken.Email)
if err != nil {
response.ResponseWithErrorCode(
ctx,