diff --git a/serv_nginx/api_bb/internal/handlers/news_handler.go b/serv_nginx/api_bb/internal/handlers/news_handler.go index e592999..ec4c6da 100644 --- a/serv_nginx/api_bb/internal/handlers/news_handler.go +++ b/serv_nginx/api_bb/internal/handlers/news_handler.go @@ -6,6 +6,7 @@ import ( "api_bb/pkg/logger" "api_bb/pkg/middleware" "api_bb/pkg/utils" + "fmt" "net/http" "strconv" @@ -78,6 +79,7 @@ func (h *NewsHandler) GetNewsByID(w http.ResponseWriter, r *http.Request) { func (h *NewsHandler) CreateNews(w http.ResponseWriter, r *http.Request) { userID, ok := r.Context().Value(middleware.UserIDKey).(uint) if !ok { + fmt.Printf("userid %d", userID) utils.RespondWithError(w, http.StatusUnauthorized, "Unauthorized") return }