init app.watches and only query for new watches if we have a token
This commit is contained in:
parent
8438b18e91
commit
dd97ec3184
3
main.go
3
main.go
@ -50,6 +50,7 @@ func main() {
|
||||
log.Fatal("can't open database: ", err)
|
||||
}
|
||||
|
||||
app.watches = &WatchResults{}
|
||||
app.queries = data.New(db)
|
||||
app.tsServer = &tsnet.Server{
|
||||
Hostname: *name,
|
||||
@ -147,7 +148,7 @@ func main() {
|
||||
|
||||
go func() {
|
||||
for {
|
||||
if dbExists {
|
||||
if dbExists && ghToken != "" {
|
||||
var err error
|
||||
app.watches, err = UpdateWatches(ghToken)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user