17 lines
507 B
Python
17 lines
507 B
Python
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})
|
|
|