mirror of
https://github.com/zedeus/nitter.git
synced 2024-11-15 13:13:46 +00:00
14 lines
392 B
Nim
14 lines
392 B
Nim
import asyncdispatch, strutils, sequtils, uri, options
|
|
import jester
|
|
import ".."/[types, api], ../views/embed
|
|
|
|
export embed
|
|
|
|
proc createEmbedRouter*(cfg: Config) =
|
|
router embed:
|
|
get "/i/videos/tweet/@id":
|
|
let convo = await getTweet(@"id")
|
|
if convo == nil or convo.tweet == nil or convo.tweet.video.isNone:
|
|
resp Http404
|
|
|
|
resp renderVideoEmbed(cfg, convo.tweet)
|