Sync poc to spec

Co-authored-by: Roberto Abdelkader Martínez Pérez <robertomartinezp@gmail.com>
This commit is contained in:
pancho horrillo
2019-05-27 11:56:25 +02:00
parent e4cbb96cf4
commit dc253f7485
9 changed files with 35 additions and 32 deletions
+3 -3
View File
@@ -17,7 +17,7 @@
#
kroute add / - <<-'EOF'
response /header/Content-Type text/html
response /headers/Content-Type text/html
response /body <<-HTML
<html>
<body>
@@ -28,7 +28,7 @@ kroute add / - <<-'EOF'
EOF
kroute add /save/magnet -e '/bin/bash -c' - <<-'EOF'
link=$(request /param/link)
link=$(request /params/link)
[ -z $link ] && response /status 400 && exit 0
watch_folder=/tmp
@@ -37,7 +37,7 @@ kroute add /save/magnet -e '/bin/bash -c' - <<-'EOF'
echo "d10:magnet-uri${#link}:${link}e" > "meta-${BASH_REMATCH[1]}.torrent"
response /status 302
response /header/Location /torrent/list
response /headers/Location /torrent/list
EOF
kroute add /torrent/list -c 'response /body "Not Implemented Yet"'