PrivacyDevel / nitter

Alternative Twitter front-end
https://nitter.net
GNU Affero General Public License v3.0
151 stars 29 forks source link

Error using .health entry point #38

Open redfalcoon opened 11 months ago

redfalcoon commented 11 months ago

After your last update .tokens has dismissed and .accounts and .health has been hinerited from nitter branch but using the web entry point

https://nitter.privacydev.net/.health

the system produce the error messages:

An error has occured in one of your routes. Detail: tables.nim(232) raiseKeyError asyncfutures.nim(389) read asyncfutures.nim(389) read key not found: favoriters

the .accounts works correctly.

rotorot0 commented 7 months ago

This should fix the issue

diff --git a/src/auth.nim b/src/auth.nim
index de1b1d8..629533d 100644
--- a/src/auth.nim
+++ b/src/auth.nim
@@ -9,6 +9,7 @@ const
   dayInSeconds = 24 * 60 * 60
   apiMaxReqs: Table[Api, int] = {
     Api.search: 50,
+    Api.followers: 50,
     Api.tweetDetail: 150,
     Api.photoRail: 180,
     Api.userTweets: 500,
@@ -20,7 +21,11 @@ const
     Api.list: 500,
     Api.listTweets: 500,
     Api.listMembers: 500,
-    Api.listBySlug: 500
+    Api.listBySlug: 500,
+    Api.favorites: 500,
+    Api.favoriters: 500,
+    Api.following: 500,
+    Api.retweeters: 500
   }.toTable

 var