Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Respond with all updated tasks & goals #44

Open
imranariffin opened this issue Oct 9, 2019 · 0 comments
Open

Respond with all updated tasks & goals #44

imranariffin opened this issue Oct 9, 2019 · 0 comments
Assignees
Labels

Comments

@imranariffin
Copy link
Owner

imranariffin commented Oct 9, 2019

Given

Database state

g0:aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaa0:in_progress
├── t0:aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaa1:in_progress
├── t1:aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaa2:in_progress
│   ├── t1.1:aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaa3:not_started
│   │   └── t1.1.1:aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaa4:not_started
│   └── t1.2:aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaa5:in_progress
│       ├── t1.2.1:aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaa6:completed:
│       └── t1.2.2:aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaa7:in_progress
└── t2:aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaa8:completed
g1:aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaa9:completed

When update

Request

PATCH /v1/tasks/aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaa7/
{
  "status": "completed"
}

Then

Response

200 OK
{
  "goals": [],
  "tasks": [
    {
      "id": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaa5",
      "parent": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaa2",
      "status": "completed"
    },
    {
      "id": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaa7",
      "parent": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaa5",
      "status": "completed"
    }
  ]
}

Database state

g0:aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaa0:in_progress
├── t0:aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaa1:in_progress
├── t1:aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaa2:in_progress
│   ├── t1.1:aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaa3:not_started
│   │   └── t1.1.1:aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaa4:not_started
│   └── t1.2:aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaa5:completed
│       ├── t1.2.1:aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaa6:completed
│       └── t1.2.2:aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaa7:completed
└── t2:aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaa8:completed
g1:aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaa9:completed
@imranariffin imranariffin self-assigned this Oct 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant