Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/jsons/status.nim
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ proc createJsonApiStatusRouter*(cfg: Config) =
respJsonError "Invalid tweet ID"

let conv = await getTweet(id, getCursor())
if conv == nil:
echo "nil conv"

if conv == nil or conv.tweet == nil or conv.tweet.id == 0:
var error = "Tweet not found"
Expand Down
6 changes: 3 additions & 3 deletions src/jsons/timeline.nim
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ proc formatProfileAsJson*(profile: Profile): JsonNode =

proc createJsonApiTimelineRouter*(cfg: Config) =
router jsonapi_timeline:
get "/api/i/user/@user_id/?":
get "/api/i/user/@user_id":
cond @"user_id".len > 0
let username = await getCachedUsername(@"user_id")
if username.len > 0:
Expand All @@ -141,8 +141,8 @@ proc createJsonApiTimelineRouter*(cfg: Config) =

get "/api/@name/?@tab?/?":
cond '.' notin @"name"
cond @"name" notin ["pic", "gif", "video", "search", "settings", "login",
"intent", "i"]
cond @"name" notin ["pic", "gif", "video", "search", "settings", "login", "intent", "i"]
cond @"name".allCharsInSet({'a'..'z', 'A'..'Z', '0'..'9', '_', ','})
cond @"tab" in ["with_replies", "media", "search", ""]
let
prefs = cookiePrefs()
Expand Down
Loading