Skip to content

Commit

Permalink
feat: Encode the url
Browse files Browse the repository at this point in the history
For some reason, I don't know why. It's a good practice to hide
information sent by fields.
  • Loading branch information
lobophf committed Oct 21, 2020
1 parent 64040a0 commit e536c3c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ const pages = require('./pages.js');
const server = express();

server
.use(express.urlencoded({ extended: true }))
.use(express.static('public'))
.set('views', path.join(__dirname, "views"))
.set('view engine', 'hbs')
.get('/', pages.index)
.get('/orphanage', pages.orphanage)
.get('/orphanages', pages.orphanages)
.get('/create-orphanage', pages.createOrphanage)
.post('/save-orphanage', pages.saveOrphanage)

server.listen(5500)
2 changes: 1 addition & 1 deletion src/views/create-orphanage.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
</footer>
</aside>
<main class="animate-appear with-sidebar">
<form action="">
<form action="save-orphanage" method="post">
<fieldset>
<legend>Dados</legend>
<div class="map-container">
Expand Down

0 comments on commit e536c3c

Please sign in to comment.