-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
eac5db7
commit e2c212b
Showing
5 changed files
with
1 addition
and
478 deletions.
There are no files selected for viewing
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 @@ | ||
TrackPath App helps users bug tracking issues in software projects as well as development of new features. |
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,115 +0,0 @@ | ||
// const express = require(`express`); | ||
// const router = express.Router(); | ||
// const Categoria = require(`../models/Categoria`); | ||
|
||
// router.get(`/categoria/add`, (req, res) => { | ||
// res.render("admin/addCategorias"); | ||
// }); | ||
|
||
// router.get(`/categoria`, (req, res) => { | ||
// Categoria.findAll() | ||
// .then(function(Categorias) { | ||
// res.render("admin/categoria", { Categorias: Categorias }); | ||
// }) | ||
// .catch(function(erro) { | ||
// req.flash("error_msg", "Erro ao incluir categoria!"); | ||
// res.send(`ERRO` + erro); | ||
// }); | ||
// }); | ||
|
||
// router.post(`/categoria/novo`, (req, res) => { | ||
// var errors = []; | ||
|
||
// if (!req.body.nome || | ||
// typeof req.body.nome === undefined || | ||
// req.body.nome == null | ||
// ) { | ||
// errors.push({ texto: "Nome invalido!" }); | ||
// } | ||
|
||
// if (!req.body.slug || | ||
// typeof req.body.slug === undefined || | ||
// req.body.slug == null | ||
// ) { | ||
// errors.push({ texto: "Slug invalido!" }); | ||
// } | ||
|
||
// console.log(errors.length); | ||
|
||
// if (errors.length > 0) { | ||
// res.render("admin/addCategorias", { erros: errors }); | ||
// } else { | ||
// Categoria.create({ | ||
// nome: req.body.nome, | ||
// slug: req.body.slug, | ||
// }) | ||
// .then(function(categoria) { | ||
// req.flash("success_msg", "Categooria incluida com sucesso!"); | ||
// res.redirect(`/admin/categoria`); | ||
// }) | ||
// .catch(function(erro) { | ||
// req.flash("error_msg", "Erro ao incluir categoria!"); | ||
// res.send(`ERRO` + erro); | ||
// }); | ||
// } | ||
// }); | ||
|
||
// router.get(`/categoria/editar/:id`, (req, res) => { | ||
// var errors = []; | ||
|
||
// Categoria.findByPk(req.params.id) | ||
// .then(function(Categoria) { | ||
// res.render("admin/editarCategoria", { | ||
// id: Categoria.id, | ||
// nome: Categoria.nome, | ||
// slug: Categoria.slug, | ||
// }); | ||
// }) | ||
// .catch(function(erro) { | ||
// req.flash("error_msg", "Erro ao editar categoria!"); | ||
// res.send(`ERRO` + erro); | ||
// }); | ||
// }); | ||
|
||
// router.post(`/categoria/editar`, (req, res) => { | ||
// var errors = []; | ||
|
||
// if (!req.body.nome || | ||
// typeof req.body.nome === undefined || | ||
// req.body.nome == null | ||
// ) { | ||
// errors.push({ texto: "Nome invalido!" }); | ||
// } | ||
|
||
// if (!req.body.slug || | ||
// typeof req.body.slug === undefined || | ||
// req.body.slug == null | ||
// ) { | ||
// errors.push({ texto: "Slug invalido!" }); | ||
// } | ||
|
||
// console.log(errors.length); | ||
|
||
// if (errors.length > 0) { | ||
// res.render("admin/editarCategoria", { erros: errors }); | ||
// } else { | ||
// Categoria.update({ | ||
// nome: req.body.nome, | ||
// slug: req.body.slug, | ||
// }, { | ||
// where: { | ||
// id: req.body.id, | ||
// }, | ||
// }) | ||
// .then(function(categoria) { | ||
// req.flash("success_msg", "Categooria editada com sucesso!"); | ||
// res.redirect(`/admin/categoria`); | ||
// }) | ||
// .catch(function(erro) { | ||
// req.flash("error_msg", "Erro ao editar categoria!"); | ||
// res.send(`ERRO` + erro); | ||
// }); | ||
// } | ||
// }); | ||
|
||
// module.exports = router; | ||
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.