update task from new to pending

This commit is contained in:
Sibunnayak 2024-09-10 10:48:04 +05:30
parent 9f65d835f5
commit b76d9b3c6d
8 changed files with 4 additions and 1 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

View File

@ -138,6 +138,7 @@ export const assignTask = async (req, res) => {
export const getTasksByStatus = async (req, res) => {
try {
await updateOverdueTasks();
const { status } = req.params; // This should be "New", "Pending", or "Completed"
// Validate the provided status
@ -167,6 +168,7 @@ export const getTasksByStatus = async (req, res) => {
};
export const getAllTasksByStatus = async (req, res) => {
try {
await updateOverdueTasks();
const { status } = req.params; // This should be "New", "Pending", or "Completed"
// Validate the provided status
@ -201,6 +203,7 @@ export const getAllTasksByStatus = async (req, res) => {
};
export const getTasksbytask = async (req, res) => {
try {
await updateOverdueTasks();
const { task } = req.params;
// Validate the provided status

View File

@ -30,7 +30,7 @@ app.get("/", (req, res) => {
});
// }
// Schedule the cron job
cron.schedule("10 0 * * *", updateOverdueTasks, {
cron.schedule("3 0 * * *", updateOverdueTasks, {
timezone: "Asia/Kolkata",
});
//<---------deployement------------->