Use new isOwner var in tests

With the var there now, this makes the code a bit more readable.
pull/169/head
Matt Baer 5 years ago
parent 55dc1917fe
commit 151e996387
  1. 4
      collections.go

@ -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 {

Loading…
Cancel
Save