This commit is contained in:
lbenedar
2026-03-10 15:39:45 +03:00
parent 281bc33897
commit 1d7beb7de4
3 changed files with 12 additions and 8 deletions

View File

@@ -28,7 +28,7 @@ func (app *application) showMovieHandler(w http.ResponseWriter, r *http.Request)
Version: 1,
}
err = app.writeJSON(w, http.StatusOK, movie, nil)
err = app.writeJSON(w, http.StatusOK, envelope{"movie": movie}, nil)
if err != nil {
app.logger.Print(err)
http.Error(w, "The server encountered a problem and could not process your request", http.StatusInternalServerError)