Skip to content

Commit

Permalink
project update
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelotrajano committed Jun 19, 2020
1 parent eac5db7 commit e2c212b
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 478 deletions.
1 change: 1 addition & 0 deletions README.md
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.
115 changes: 0 additions & 115 deletions routes/admin.js
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;
269 changes: 0 additions & 269 deletions views/dashboard.handlebars

This file was deleted.

8 changes: 0 additions & 8 deletions views/index.handlebars

This file was deleted.

Loading

0 comments on commit e2c212b

Please sign in to comment.