diff --git a/serv_nginx/Makefile b/serv_nginx/Makefile index 693b33c..917dea9 100644 --- a/serv_nginx/Makefile +++ b/serv_nginx/Makefile @@ -1,6 +1,4 @@ -BB=bb_api - -all: bb +all: bb api_bb_logs git: git pull @@ -11,7 +9,7 @@ stop_bb: build_bb: docker compose build api_bb --no-cache -bb: git stop_bb build_bb bbb api_bb_logs +bb: git stop_bb build_bb bbb docker compose up api_bb -d bb_db: diff --git a/serv_nginx/api_bb/internal/handlers/news_handler.go b/serv_nginx/api_bb/internal/handlers/news_handler.go index 006035a..0c4b251 100644 --- a/serv_nginx/api_bb/internal/handlers/news_handler.go +++ b/serv_nginx/api_bb/internal/handlers/news_handler.go @@ -79,6 +79,7 @@ func (h *NewsHandler) GetNewsByID(w http.ResponseWriter, r *http.Request) { func (h *NewsHandler) CreateNews(w http.ResponseWriter, r *http.Request) { logger.Get().Debug("Start CreateNews Method") userID, ok := r.Context().Value(middleware.UserIDKey).(uint) + logger.Get().Info("userID", zap.Uint("userID", userID)) if !ok { fmt.Printf("userid %d", userID) utils.RespondWithError(w, http.StatusUnauthorized, "Unauthorized")