ch4.4
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user