Use new isOwner var in tests

With the var there now, this makes the code a bit more readable.
This commit is contained in:
Matt Baer 2019-09-10 21:21:45 +02:00
parent 55dc1917fe
commit 151e996387
1 changed files with 2 additions and 2 deletions

View File

@ -770,7 +770,7 @@ func handleViewCollection(app *App, w http.ResponseWriter, r *http.Request) erro
}
}
isOwner := owner != nil
if owner == nil {
if !isOwner {
// Current user doesn't own collection; retrieve owner information
owner, err = app.db.GetUserByID(coll.OwnerID)
if err != nil {
@ -868,7 +868,7 @@ func handleViewCollectionTag(app *App, w http.ResponseWriter, r *http.Request) e
}
}
isOwner := owner != nil
if owner == nil {
if !isOwner {
// Current user doesn't own collection; retrieve owner information
owner, err = app.db.GetUserByID(coll.OwnerID)
if err != nil {