Browse Source

add index redirect

master
Andrea Cimbalo 7 years ago
parent
commit
2d8f019617
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      server.py

+ 5
- 1
server.py View File

@ -2,7 +2,7 @@
import lilikusers import lilikusers
import json import json
from flask import Flask, jsonify from flask import Flask, jsonify
from flask import request, Response
from flask import request, Response, redirect, url_for
from functools import wraps from functools import wraps
app = Flask(__name__) app = Flask(__name__)
@ -96,5 +96,9 @@ def new_user(user):
print(lilik_ldap.new_user(new_lilik_user)) print(lilik_ldap.new_user(new_lilik_user))
return jsonify(lilik_ldap.get_user(new_lilik_user['uid']).to_dict()) return jsonify(lilik_ldap.get_user(new_lilik_user['uid']).to_dict())
@app.route('/')
def home():
return redirect(url_for('static', filename='index.html'))
if __name__ == '__main__': if __name__ == '__main__':
app.run(debug=True) app.run(debug=True)

Loading…
Cancel
Save