This commit is contained in:
lbenedar
2026-03-10 14:31:03 +03:00
commit 10748c612b
8 changed files with 122 additions and 0 deletions

19
cmd/api/movies.go Normal file
View File

@@ -0,0 +1,19 @@
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)
}