feat: update staff data
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user