add vue client folders, rename server files accordingly and update code

This commit is contained in:
Xevion
2020-08-04 10:55:20 -05:00
parent 08f012a40f
commit a2aef9afc3
438 changed files with 12283 additions and 14 deletions

17
server/api.py Normal file
View File

@@ -0,0 +1,17 @@
"""
api.py
Provides a accessible protected backend API. JSON I/O only, CSRF protected.
"""
import flask_wtf
from flask import current_app, jsonify
@current_app.route('/api/csrf/')
def csrf():
"""
Page used for refreshing expired CSRF tokens via AJAX.
Probably secure: https://medium.com/@iaincollins/csrf-tokens-via-ajax-a885c7305d4a
"""
return jsonify(flask_wtf.csrf.generate_csrf())