Skip to content

Commit

Permalink
fixed merge conflicts in JSON files
Browse files Browse the repository at this point in the history
  • Loading branch information
angelika930 committed Nov 27, 2023
1 parent 974770c commit 768916a
Showing 1 changed file with 0 additions and 41 deletions.
41 changes: 0 additions & 41 deletions studywell-backend/task-functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,45 +4,25 @@ import taskModel from "./task.js";

// const dotenv = require('dotenv');
dotenv.config();
<<<<<<< HEAD
=======
let count = 0;
>>>>>>> backend

mongoose.set("debug", true);

mongoose
.connect(
"mongodb+srv://" +
<<<<<<< HEAD
/* eslint-disable-next-line no-undef*/
process.env.MONGO_USER +
":" +
/* eslint-disable-next-line no-undef*/
process.env.MONGO_PWD +
"@" +
/* eslint-disable-next-line no-undef*/
process.env.MONGO_CLUSTER +
"/" +
/* eslint-disable-next-line no-undef*/
=======
process.env.MONGO_USER +
":" +
process.env.MONGO_PWD +
"@" +
process.env.MONGO_CLUSTER +
"/" +
>>>>>>> backend
process.env.MONGO_DB +
"?retryWrites=true&w=majority",
{
useNewUrlParser: true, //useFindAndModify: false,
useUnifiedTopology: true,
<<<<<<< HEAD
},
=======
}
>>>>>>> backend
)
.catch((error) => console.log(error));

Expand All @@ -51,28 +31,12 @@ function getTasks(description) {
if (description === undefined) {
promise = taskModel.find();
}
<<<<<<< HEAD
console.log(promise);
=======
// console.log(promise);
>>>>>>> backend
return promise;
}

function addTasks(task) {
const taskToAdd = new taskModel(task);
const promise = taskToAdd.save();
<<<<<<< HEAD
console.log(promise);
return promise;
}

function findTaskID(id) {
return taskModel.find({ id: id });
}
function deleteUser(id) {
return taskModel.findByIdAndDelete(id);
=======
//console.log(promise);
return promise;
}
Expand All @@ -89,15 +53,10 @@ async function deleteUser(id) {
console.error(error);
throw error; // Rethrow the error to handle it in the calling function
}
>>>>>>> backend
}
export default {
getTasks,
addTasks,
<<<<<<< HEAD
findTaskID,
=======
findTaskIndex,
>>>>>>> backend
deleteUser,
};

0 comments on commit 768916a

Please sign in to comment.