Skip to content

Commit

Permalink
Merge pull request #7 from fga-eps-mds/fixing_tests
Browse files Browse the repository at this point in the history
fixin prettier
  • Loading branch information
guipeeix7 authored Jan 30, 2025
2 parents bb8f6d1 + 2d3f0d1 commit 23ef7fe
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
2 changes: 0 additions & 2 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,5 @@ const config = {

// Whether to use watchman for file crawling
// watchman: true,


};
module.exports = config;
10 changes: 5 additions & 5 deletions src/Controllers/financialMovementsController.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const FinancialMovements = require("../Models/financialMovementsSchema");

const validateCPF = (cpf) => {
return /\d{3}\.\d{3}\.\d{3}-\d{2}/.test(cpf);
};
// const validateCPF = (cpf) => {
// return /\d{3}\.\d{3}\.\d{3}-\d{2}/.test(cpf);
// };

const createFinancialMovements = async (req, res) => {
try {
Expand All @@ -14,8 +14,8 @@ const createFinancialMovements = async (req, res) => {
/* if (!validateCPF(financialMovementsData.cpFCnpj)) {
return res.status(400).send({ error: "Invalid CPF" });
} */
if (!financialMovementsData.contaOrigem) {
throw new Error("Database error");
if (!financialMovementsData.contaOrigem) {
throw new Error("Database error");
}

// Criação da movimentação financeira
Expand Down
4 changes: 2 additions & 2 deletions src/Models/financialMovementsSchema.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ const financialMovementsSchema = new mongoose.Schema({
type: Date,
default: Date.now,
},
gastoFixo:{
gastoFixo: {
type: Boolean,
default: false,
}
},
});

const financialMovements = mongoose.model(
Expand Down

0 comments on commit 23ef7fe

Please sign in to comment.