update task from new to pending
This commit is contained in:
parent
9f65d835f5
commit
b76d9b3c6d
BIN
public/temp/tmp-1-1725944572643
Normal file
BIN
public/temp/tmp-1-1725944572643
Normal file
Binary file not shown.
After Width: | Height: | Size: 138 KiB |
BIN
public/temp/tmp-2-1725944572654
Normal file
BIN
public/temp/tmp-2-1725944572654
Normal file
Binary file not shown.
After Width: | Height: | Size: 138 KiB |
BIN
public/temp/tmp-3-1725944572665
Normal file
BIN
public/temp/tmp-3-1725944572665
Normal file
Binary file not shown.
After Width: | Height: | Size: 138 KiB |
BIN
public/temp/tmp-4-1725944572671
Normal file
BIN
public/temp/tmp-4-1725944572671
Normal file
Binary file not shown.
After Width: | Height: | Size: 138 KiB |
BIN
public/temp/tmp-5-1725944572681
Normal file
BIN
public/temp/tmp-5-1725944572681
Normal file
Binary file not shown.
After Width: | Height: | Size: 138 KiB |
BIN
public/temp/tmp-6-1725944572689
Normal file
BIN
public/temp/tmp-6-1725944572689
Normal file
Binary file not shown.
After Width: | Height: | Size: 138 KiB |
@ -138,6 +138,7 @@ export const assignTask = async (req, res) => {
|
|||||||
|
|
||||||
export const getTasksByStatus = async (req, res) => {
|
export const getTasksByStatus = async (req, res) => {
|
||||||
try {
|
try {
|
||||||
|
await updateOverdueTasks();
|
||||||
const { status } = req.params; // This should be "New", "Pending", or "Completed"
|
const { status } = req.params; // This should be "New", "Pending", or "Completed"
|
||||||
|
|
||||||
// Validate the provided status
|
// Validate the provided status
|
||||||
@ -167,6 +168,7 @@ export const getTasksByStatus = async (req, res) => {
|
|||||||
};
|
};
|
||||||
export const getAllTasksByStatus = async (req, res) => {
|
export const getAllTasksByStatus = async (req, res) => {
|
||||||
try {
|
try {
|
||||||
|
await updateOverdueTasks();
|
||||||
const { status } = req.params; // This should be "New", "Pending", or "Completed"
|
const { status } = req.params; // This should be "New", "Pending", or "Completed"
|
||||||
|
|
||||||
// Validate the provided status
|
// Validate the provided status
|
||||||
@ -201,6 +203,7 @@ export const getAllTasksByStatus = async (req, res) => {
|
|||||||
};
|
};
|
||||||
export const getTasksbytask = async (req, res) => {
|
export const getTasksbytask = async (req, res) => {
|
||||||
try {
|
try {
|
||||||
|
await updateOverdueTasks();
|
||||||
const { task } = req.params;
|
const { task } = req.params;
|
||||||
|
|
||||||
// Validate the provided status
|
// Validate the provided status
|
||||||
|
@ -30,7 +30,7 @@ app.get("/", (req, res) => {
|
|||||||
});
|
});
|
||||||
// }
|
// }
|
||||||
// Schedule the cron job
|
// Schedule the cron job
|
||||||
cron.schedule("10 0 * * *", updateOverdueTasks, {
|
cron.schedule("3 0 * * *", updateOverdueTasks, {
|
||||||
timezone: "Asia/Kolkata",
|
timezone: "Asia/Kolkata",
|
||||||
});
|
});
|
||||||
//<---------deployement------------->
|
//<---------deployement------------->
|
||||||
|
Loading…
Reference in New Issue
Block a user