mirror of
https://gitlab.com/2-chainz/2-chainz-rest.git
synced 2025-08-05 04:51:28 +00:00
18 lines
249 B
Python
18 lines
249 B
Python
from fastapi import FastAPI
|
|
import json
|
|
import random
|
|
|
|
quotes = json.load(open("quotes.json"))
|
|
|
|
app = FastAPI()
|
|
|
|
|
|
@app.get("/")
|
|
async def quote():
|
|
return {"message": random.choice(quotes)}
|
|
|
|
|
|
@app.get("/dump")
|
|
async def dump():
|
|
return quotes
|