Skip to content

Commit

Permalink
Merge pull request #429 from Real-Dev-Squad/feat/add-feature-flag-use…
Browse files Browse the repository at this point in the history
…rStatusFlag

Add feature flag userStatusFlag to tasks patch call
  • Loading branch information
heyrandhir authored Jul 6, 2023
2 parents 043f0a1 + e074e68 commit 470ba99
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions app/controllers/tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,14 +149,17 @@ export default class TasksController extends Controller {
const cleanBody = this.constructReqBody(taskData);
if (taskData.status || taskData.percentCompleted) {
try {
const response = await fetch(`${API_BASE_URL}/tasks/self/${taskId}`, {
method: 'PATCH',
body: JSON.stringify(cleanBody),
headers: {
'Content-Type': 'application/json',
},
credentials: 'include',
});
const response = await fetch(
`${API_BASE_URL}/tasks/self/${taskId}?userStatusFlag=true`,
{
method: 'PATCH',
body: JSON.stringify(cleanBody),
headers: {
'Content-Type': 'application/json',
},
credentials: 'include',
}
);

if (response.ok) {
this.toast.success('Successfully updated the task', '', {
Expand Down

0 comments on commit 470ba99

Please sign in to comment.