init commit
This commit is contained in:
17
app/blueprints/char.py
Normal file
17
app/blueprints/char.py
Normal file
@@ -0,0 +1,17 @@
|
||||
from flask import Blueprint, g, jsonify, current_app
|
||||
from typing import cast
|
||||
from app.utils.typed_flask import CoCFlask
|
||||
|
||||
# from app.services.appwrite_client import AppWriteClient
|
||||
|
||||
# type cast flask to my custom flask app so the app.api methods are available in the IDE / typed correctly.
|
||||
app = cast(CoCFlask,current_app)
|
||||
|
||||
# blueprint def
|
||||
char_bp = Blueprint("char", __name__, url_prefix="/char")
|
||||
|
||||
|
||||
@char_bp.route("/", methods=["GET", "POST"])
|
||||
def char():
|
||||
return app.api.ok({"user":g.appwrite_user})
|
||||
|
||||
Reference in New Issue
Block a user