Fixed priority not updating when set to 0
This commit is contained in:
parent
55e33c1694
commit
93dbaea303
3 changed files with 10 additions and 11 deletions
|
@ -88,6 +88,7 @@ Sorry for some of them being in German, I'll tranlate them at some point.
|
|||
* [x] Team member handling
|
||||
* [x] Also check `ReadOne()` for unnessecary database operations since the inital query is already done in `CanRead()`
|
||||
* [x] Add a `User.AfterLoad()` which obfuscates the email address
|
||||
* [x] Fix priority not updating to 0
|
||||
|
||||
### Docs
|
||||
|
||||
|
@ -188,10 +189,6 @@ Sorry for some of them being in German, I'll tranlate them at some point.
|
|||
* [ ] Check if the team/user really exist before updating them on lists/namespaces
|
||||
* [ ] Check if the email is properly obfuscated everywhere -> alter GetUser() and add a new method GetUserWithEmail
|
||||
|
||||
### Fixes
|
||||
|
||||
* [ ] Fix priority not updating to 0
|
||||
|
||||
### Linters
|
||||
|
||||
* [x] goconst
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
# Get all lists
|
||||
GET http://localhost:8080/api/v1/namespaces/1
|
||||
GET http://localhost:8080/api/v1/namespaces/35/lists
|
||||
Authorization: Bearer {{auth_token}}
|
||||
|
||||
###
|
||||
|
||||
# Get one list
|
||||
GET http://localhost:8080/api/v1/lists/27
|
||||
GET http://localhost:8080/api/v1/lists/1172
|
||||
Authorization: Bearer {{auth_token}}
|
||||
|
||||
###
|
||||
|
||||
# Add a new list
|
||||
PUT http://localhost:8080/api/v1/namespaces/1/lists
|
||||
PUT http://localhost:8080/api/v1/namespaces/35/lists
|
||||
Authorization: Bearer {{auth_token}}
|
||||
Content-Type: application/json
|
||||
|
||||
|
@ -135,10 +135,7 @@ Authorization: Bearer {{auth_token}}
|
|||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"labels": [
|
||||
{"id": 1},
|
||||
{"id": 2}
|
||||
]
|
||||
"priority": 0
|
||||
}
|
||||
|
||||
###
|
||||
|
|
|
@ -133,6 +133,11 @@ func (t *ListTask) Update() (err error) {
|
|||
ot.Done = false
|
||||
}
|
||||
|
||||
// If the priority is 0, we also need to explicitly check that here
|
||||
if t.Priority == 0 {
|
||||
ot.Priority = 0
|
||||
}
|
||||
|
||||
_, err = x.ID(t.ID).
|
||||
Cols("text",
|
||||
"description",
|
||||
|
|
Loading…
Reference in a new issue