This commit is contained in:
lbenedar
2026-03-17 12:53:48 +03:00
parent 5206e9ca22
commit dbd1c6eee8
2 changed files with 28 additions and 4 deletions

View File

@@ -10,10 +10,10 @@ import (
func (app *application) createMovieHandler(w http.ResponseWriter, r *http.Request) {
var input struct {
Title string `json:"title"`
Year int32 `json:"year"`
Runtime int32 `json:"runtime"`
Genres []string `json:"genres"`
Title string `json:"title"`
Year int32 `json:"year"`
Runtime data.Runtime `json:"runtime"`
Genres []string `json:"genres"`
}
err := app.readJSON(w, r, &input)