Don't error when an owner is missing
This commit is contained in:
parent
533432ca8b
commit
728f9e1675
6
app.go
6
app.go
@ -28,11 +28,7 @@ func (a *App) getOwner(r *http.Request) (*tailcfg.Node, error) {
|
||||
ownerID := int64(who.Node.ID)
|
||||
|
||||
ownerExists, err := a.queries.GetOwner(a.ctx, ownerID)
|
||||
if err != nil {
|
||||
log.Println("owner exists query failed: ", err)
|
||||
}
|
||||
|
||||
if ownerExists.ID != ownerID {
|
||||
if err != nil || ownerExists.ID != ownerID {
|
||||
_, err = a.queries.AddOwner(a.ctx, data.AddOwnerParams{
|
||||
ID: int64(who.Node.ID),
|
||||
Name: who.Node.ComputedName,
|
||||
|
Loading…
Reference in New Issue
Block a user