Skip to content

Commit

Permalink
added new tarot card form
Browse files Browse the repository at this point in the history
Relates #12
  • Loading branch information
xIrusux committed Aug 23, 2019
1 parent 89ecdf3 commit dca1c08
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/controllers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@ const router = express.Router();
const home = require('./home');
const error = require('./error');
const tarot = require('./tarot');
const newtarot = require('./newtarot');

router.get('/', home.get);
router.get('/tarot', tarot.tarot);
router.get('/newtarot', newtarot.newtarot);
router.use(error.client);
router.use(error.server);



module.exports = router;
3 changes: 3 additions & 0 deletions src/controllers/newtarot.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
exports.newtarot = (req, res) => {
res.render("newtarot")
}
12 changes: 12 additions & 0 deletions src/views/newtarot.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<section class="add-tarot">

<form class="add-tarot-form" method="POST" action="/newtarot">
<label for="tarotTitle">
<input name="tarot-title" id="tarotTitle">
</label>
<label for="tarotDescription">
<input name="tarot-description" id="tarotDescription">
</label>
<input type="submit">
</form>
</section>

0 comments on commit dca1c08

Please sign in to comment.