diff options
author | rsiddharth <s@ricketyspace.net> | 2019-09-28 15:47:01 -0400 |
---|---|---|
committer | rsiddharth <s@ricketyspace.net> | 2019-09-28 15:47:01 -0400 |
commit | 03009f4109a94c74d1dccab0b14b4e4f00f43205 (patch) | |
tree | 349152aa2fdc1eec338ff3b05b31e3e06f4fa0b6 /nfsw | |
parent | e09caadb899189ee0fa426d7be6713c023621848 (diff) |
nfsw/io.py: Add intro.
* nfsw/io.py (intro): New function.
Diffstat (limited to 'nfsw')
-rw-r--r-- | nfsw/io.py | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -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}) + } |