Added DB schema notes

Compressed imports
Added api blueprint
This commit is contained in:
benjamyn committed 2024-04-28 15:25:01 +10:00
1 parent e1aca07cfc
commit 58b6a527eb
4 files changed
+31 -3

No files matched your search

+15
View File
@@ -1,5 +1,20 @@
import sqlite3
# tables
# manga
# chapters_downloaded
# Schema - manga
# id
# uuid
# title
# thumbnail
# Schema - chapters_downloaded
# id
# chapter_number
# manga_id
class DB:
def __init__(self, path):
+2 -1
View File
@@ -1,4 +1,4 @@
from routes import root
from routes import root, api
from flask import Flask
from os.path import expanduser
@@ -15,3 +15,4 @@ class App(Flask):
def register_blueprints(self):
self.register_blueprint(root.bp)
self.register_blueprint(api.bp)
+13
View File
@@ -0,0 +1,13 @@
from flask import Blueprint, current_app
bp = Blueprint("api", __name__, url_prefix="/api")
@bp.route("/")
def root():
return current_app.name
@bp.route("/test")
def test():
return {"this works": "How I Expected"}
+1 -2
View File
@@ -1,5 +1,4 @@
from flask import Blueprint
from flask import current_app
from flask import Blueprint, current_app
bp = Blueprint("root", __name__, url_prefix="/")