Add workaround for Twitter's layout A/B testing

Fixes #110
This commit is contained in:
Zed 2020-01-19 08:34:32 +01:00
commit ba57511a01
10 changed files with 43 additions and 21 deletions

View file

@ -41,7 +41,8 @@ proc hasCachedProfile*(username: string): Option[Profile] =
except AssertionError, KeyError:
result = none Profile
proc getCachedProfile*(username, agent: string; force=false): Future[Profile] {.async.} =
proc getCachedProfile*(username, agent: string;
force=false): Future[Profile] {.async.} =
withDb:
try:
result.getOne("lower(username) = ?", toLower(username))