diff options
author | Ben Morrison <ben@gbmor.dev> | 2019-06-04 18:50:49 -0400 |
---|---|---|
committer | Ben Morrison <ben@gbmor.dev> | 2019-06-04 18:50:49 -0400 |
commit | db1dc5d8c2d1557b085b63cb8c511f5a9864b38e (patch) | |
tree | 280484dfbd18289ec57042f2d7edfe327b02425b | |
parent | 0590df3c76934157833a7c3dfe65fd725e30a924 (diff) | |
download | getwtxt-db1dc5d8c2d1557b085b63cb8c511f5a9864b38e.tar.gz |
updated index.AddUser() calls to reflect new version of registry lib
-rw-r--r-- | cache_test.go | 4 | ||||
-rw-r--r-- | post.go | 2 | ||||
-rw-r--r-- | query_test.go | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/cache_test.go b/cache_test.go index fc2d341..2fef6be 100644 --- a/cache_test.go +++ b/cache_test.go @@ -45,7 +45,7 @@ func Test_pushpullDatabase(t *testing.T) { if err != nil { t.Errorf("Couldn't set up test: %v\n", err) } - twtxtCache.AddUser("gbmor", "https://gbmor.dev/twtxt.txt", net.ParseIP("127.0.0.1"), statusmap) + twtxtCache.AddUser("gbmor", "https://gbmor.dev/twtxt.txt", "", net.ParseIP("127.0.0.1"), statusmap) remoteRegistries.Mu.Lock() remoteRegistries.List = append(remoteRegistries.List, "https://twtxt.tilde.institute/api/plain/users") remoteRegistries.Mu.Unlock() @@ -93,7 +93,7 @@ func Benchmark_pushDatabase(b *testing.B) { b.Errorf("Couldn't set up benchmark: %v\n", err) } - twtxtCache.AddUser("gbmor", "https://gbmor.dev/twtxt.txt", net.ParseIP("127.0.0.1"), statusmap) + twtxtCache.AddUser("gbmor", "https://gbmor.dev/twtxt.txt", "", net.ParseIP("127.0.0.1"), statusmap) } b.ResetTimer() diff --git a/post.go b/post.go index 7846c7e..3f571e3 100644 --- a/post.go +++ b/post.go @@ -52,7 +52,7 @@ func apiPostUser(w http.ResponseWriter, r *http.Request) { log.Printf("Error Parsing User Data: %v\n", err.Error()) } - if err := twtxtCache.AddUser(nick, urls, uip, statuses); err != nil { + if err := twtxtCache.AddUser(nick, urls, "", uip, statuses); err != nil { log400(w, r, "Error Adding User to Cache: "+err.Error()) return } diff --git a/query_test.go b/query_test.go index 3782165..b914b26 100644 --- a/query_test.go +++ b/query_test.go @@ -25,7 +25,7 @@ func Test_parseQueryOut(t *testing.T) { t.Errorf("Couldn't set up test: %v\n", err) } - twtxtCache.AddUser(nick, urls, net.ParseIP("127.0.0.1"), statusmap) + twtxtCache.AddUser(nick, urls, "", net.ParseIP("127.0.0.1"), statusmap) t.Run("Parsing Status Query", func(t *testing.T) { data, err := twtxtCache.QueryAllStatuses() @@ -59,7 +59,7 @@ func Benchmark_parseQueryOut(b *testing.B) { b.Errorf("Couldn't set up test: %v\n", err) } - twtxtCache.AddUser(nick, urls, net.ParseIP("127.0.0.1"), statusmap) + twtxtCache.AddUser(nick, urls, "", net.ParseIP("127.0.0.1"), statusmap) data, err := twtxtCache.QueryAllStatuses() if err != nil { |