Skip to content

Commit

Permalink
Merge pull request #5 from fga-eps-mds/US11-selecionar-tipo-de-docume…
Browse files Browse the repository at this point in the history
…nto-financeiro

Us11 selecionar tipo de documento financeiro
  • Loading branch information
daniso0412 authored Jan 26, 2025
2 parents 7e95c83 + 51c3fce commit 1b97c95
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Controllers/financialMovementsController.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ const createFinancialMovements = async (req, res) => {
if (!financialMovementsData) {
return res.status(400).send({ error: "No data provided" });
}
if (!validateCPF(financialMovementsData.cpFCnpj)) {
/* if (!validateCPF(financialMovementsData.cpFCnpj)) {
return res.status(400).send({ error: "Invalid CPF" });
}
} */
if (!financialMovementsData.contaOrigem) {

Check failure on line 18 in src/Controllers/financialMovementsController.js

View workflow job for this annotation

GitHub Actions / lint

Delete `··`
throw new Error("Database error");

Check failure on line 19 in src/Controllers/financialMovementsController.js

View workflow job for this annotation

GitHub Actions / lint

Delete `·`
}
Expand Down
5 changes: 5 additions & 0 deletions src/Models/financialMovementsSchema.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const financialMovementsSchema = new mongoose.Schema({
tipoDocumento: {
type: String,
required: true,
default: " ",
},
cpFCnpj: {
type: String,
Expand Down Expand Up @@ -77,6 +78,10 @@ const financialMovementsSchema = new mongoose.Schema({
type: Date,
default: Date.now,
},
gastoFixo:{
type: Boolean,
default: false,
}
});

const financialMovements = mongoose.model(
Expand Down

0 comments on commit 1b97c95

Please sign in to comment.