summaryrefslogtreecommitdiffstats
path: root/nfsw/io.py
diff options
context:
space:
mode:
authorrsiddharth <s@ricketyspace.net>2019-09-28 15:47:01 -0400
committerrsiddharth <s@ricketyspace.net>2019-09-28 15:47:01 -0400
commit03009f4109a94c74d1dccab0b14b4e4f00f43205 (patch)
tree349152aa2fdc1eec338ff3b05b31e3e06f4fa0b6 /nfsw/io.py
parente09caadb899189ee0fa426d7be6713c023621848 (diff)
nfsw/io.py: Add intro.
* nfsw/io.py (intro): New function.
Diffstat (limited to 'nfsw/io.py')
-rw-r--r--nfsw/io.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/nfsw/io.py b/nfsw/io.py
index 7d4c600..bc3ab20 100644
--- a/nfsw/io.py
+++ b/nfsw/io.py
@@ -5,6 +5,7 @@ import nfsw.scenes as scenes
from nfsw.auth import login_required, login_required_ajax
from nfsw.redis import redis as r, key as k
from nfsw.scenes import current_scene
+from nfsw.util import read_junk
from flask import (
Blueprint, render_template, request
@@ -56,3 +57,18 @@ def query():
}
+@bp.route('/io/intro', methods=['POST'])
+@login_required_ajax
+@preprocess
+def intro():
+
+ # Get current scene
+ scene = current_scene()
+ if scene is None:
+ return {
+ 'intro': read_junk('foobar/god')
+ }, 500
+
+ return {
+ 'intro': scene({'intro': 1})
+ }