first commit

This commit is contained in:
Daniel
2023-02-02 00:43:27 +02:00
commit 679d857570
29 changed files with 3540 additions and 0 deletions

12
controllers/getTasks.js Normal file
View File

@@ -0,0 +1,12 @@
const taskModel = require("../models/taskModel")
const getTasks = async (req, res, next) => {
try {
const tasks = await taskModel.find({})
res.status(200).json({tasks})
} catch (error) {
res.status(400).json({msg: error.errors.name.message})
}
}
module.exports = getTasks