from flask import Flask, jsonify
from flask_sqlalchemy import SQLAlchemy
from random import randint

app = Flask(__name__)
app.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:///MOTD.db"

# get rid of that annoying TRACK msg in stdout
app.config["SQLALCHEMY_TRACK_MODIFICATIONS"] = False
db = SQLAlchemy(app)

class Quotes(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    season = db.Column(db.Integer)
    quote = db.Column(db.String(200))


@app.route("/")
def motd():
    q = randint(1, 1114)
    i = Quotes().query.filter_by(id=q)[0]

    return jsonify({
        "res": f"{i.quote}"
    }), 200
from flask import Flask, jsonify
from flask_sqlalchemy import SQLAlchemy
from random import randint

app = Flask(__name__)
app.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:///MOTD.db"

# get rid of that annoying TRACK msg in stdout
app.config["SQLALCHEMY_TRACK_MODIFICATIONS"] = False
db = SQLAlchemy(app)

class Quotes(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    season = db.Column(db.Integer)
    quote = db.Column(db.String(200))


@app.route("/")
def motd():
    q = randint(1, 1114)
    i = Quotes().query.filter_by(id=q)[0]

    return jsonify({
        "res": f"{i.quote}"
    }), 200
# get rid of that annoying TRACK msg in stdout