Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
serinryu
authored and
serinryu
committed
Jan 24, 2022
1 parent
d0824a9
commit b302c54
Showing
10 changed files
with
71 additions
and
5 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
import express from "express"; | ||
import { home, movieDetail, filterMovie } from "../controllers/movieController.js"; | ||
import { home, movieDetail, filterMovie, getAdd, postAdd } from "../controllers/movieController.js"; | ||
|
||
const movieRouter = express.Router(); | ||
|
||
movieRouter.get("/", home); | ||
movieRouter.get("/filter", filterMovie); | ||
movieRouter.route("/add").get(getAdd).post(postAdd); | ||
movieRouter.get("/:id", movieDetail); | ||
|
||
export default movieRouter; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
extends ../layout.pug | ||
block content | ||
include ../partials/addForm.pug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
extends ../layout.pug | ||
block content | ||
p=movie.description_full | ||
p=movie.synopsis | ||
ul | ||
each genre in movie.genres | ||
li | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
form(action="/add",method="POST") | ||
input(type="text", placeholder="Title", name="title",required) | ||
textarea(placeholder="Synopsis", name="synopsis",required) | ||
input(type="text", placeholder="Genres", name="genres",required) | ||
input(type="submit", value="Add Movie") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,7 @@ | ||
header | ||
ul | ||
li | ||
a(href="/") Home | ||
li | ||
a(href="/add") Add | ||
h1=pageTitle |