From 813cfefbb4a7af24480344c75b93d76dacb2f014 Mon Sep 17 00:00:00 2001 From: Zed Date: Wed, 23 Oct 2019 09:47:02 +0200 Subject: [PATCH] Refactor list routes --- src/routes/list.nim | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/routes/list.nim b/src/routes/list.nim index ebac6bc..ea4d8e7 100644 --- a/src/routes/list.nim +++ b/src/routes/list.nim @@ -17,14 +17,10 @@ proc createListRouter*(cfg: Config) = router list: get "/@name/lists/@list": cond '.' notin @"name" - let - list = await getListTimeline(@"name", @"list", @"max_position", getAgent()) - tweets = renderTimelineTweets(list, cookiePrefs(), request.path) - respList list, tweets + let list = await getListTimeline(@"name", @"list", @"max_position", getAgent()) + respList list, renderTimelineTweets(list, cookiePrefs(), request.path) get "/@name/lists/@list/members": cond '.' notin @"name" - let - list = await getListMembers(@"name", @"list", @"max_position", getAgent()) - users = renderTimelineUsers(list, cookiePrefs(), request.path) - respList list, users + let list = await getListMembers(@"name", @"list", @"max_position", getAgent()) + respList list, renderTimelineUsers(list, cookiePrefs(), request.path)