Files
greenlight/cmd/api/movies.go
lbenedar 10748c612b ch2
2026-03-10 14:31:03 +03:00

20 lines
393 B
Go

package main
import (
"fmt"
"net/http"
)
func (app *application) createMovieHandler(w http.ResponseWriter, r *http.Request) {
fmt.Fprintln(w, "create a new movie")
}
func (app *application) showMovieHandler(w http.ResponseWriter, r *http.Request) {
id, err := app.readIDParam(r)
if err != nil {
http.NotFound(w, r)
return
}
fmt.Fprintf(w, "show the details of movie %d\n", id)
}