Skip to content

Commit 39888cc

Browse files
committed
handle task status using constants
1 parent fa1df85 commit 39888cc

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

csharp/ProjectManagementSystem/Controllers/TasksController.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,13 @@ private string GetUserId()
111111

112112
private string GetTaskStatus(string status)
113113
{
114-
if (status == TaskStatus.Ready)
114+
if (status == "Ready")
115115
return TaskStatus.Ready;
116-
if (status == TaskStatus.InProgress)
116+
if (status == "InProgress")
117117
return TaskStatus.InProgress;
118-
if (status == TaskStatus.Completed)
118+
if (status == "Completed")
119119
return TaskStatus.Completed;
120-
if (status == TaskStatus.OnHold)
120+
if (status == "OnHold")
121121
return TaskStatus.OnHold;
122122
else
123123
{

0 commit comments

Comments
 (0)