Skip to content

Commit

Permalink
limpeza
Browse files Browse the repository at this point in the history
  • Loading branch information
Marzeu committed Nov 6, 2020
1 parent d6a396e commit 32cccd8
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 227 deletions.
215 changes: 0 additions & 215 deletions public/carrinho/mainold.js

This file was deleted.

4 changes: 2 additions & 2 deletions public/produto/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ function sweetAlert() {
})
.then((updateProduct) => {
if (updateProduct) {
window.location.href = '/usuarios/produtos'
window.location.href = '/usuarios/produtos'
} else {
window.location.href = '/'
window.location.href = '/'
};
});
};
Expand Down
10 changes: 0 additions & 10 deletions server.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
const jsonServer = require('json-server');
const path = require('path');
// const bodyParser = require('body-parser');

const router = jsonServer.router(path.join(__dirname, './database/db.json'))
const server = jsonServer.create();
Expand All @@ -12,15 +11,6 @@ const port = process.env.PORT || 8080;
server.use(middlewares);
server.use(router);

// server.use(jsonServer.bodyParser)
// server.use((req, res, next) => {
// if (req.method === 'POST') {
// req.body.createdAt = Date.now()
// }
// // Continue to JSON Server router
// next()
// })

server.listen(port, () => {
console.log(`Server is running on http://localhost:${port}`)
});

0 comments on commit 32cccd8

Please sign in to comment.