Skip to content

Commit

Permalink
add favicon
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcus5408 committed Aug 15, 2023
1 parent d57f5d2 commit 8f40bee
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
Binary file added assets/favicon.ico
Binary file not shown.
15 changes: 10 additions & 5 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
from flask import Flask
from flask_restful import Api, Resource, reqparse
from flask import Flask, send_from_directory
from flask_restful import Api
import random
import json
import requests
import os

app = Flask(__name__)
api = Api(app)
# api = Api(app)

long_quotes = requests.get("https://raw.githubusercontent.com/Marcus5408/orv-quote-api/main/quotes/long_quotes.json").json()
short_quotes = requests.get("https://raw.githubusercontent.com/Marcus5408/orv-quote-api/main/quotes/short_quotes.json").json()
Expand All @@ -25,7 +25,12 @@ def any_quote() -> str:

@app.route("/", methods=["GET"])
def index():
return "This API provides a random quote from ORV.", 200
return "<html><h1>ORV Quote API</h1><p>This API provides a random quote from ORV.</p></html>", 200

@app.route('/favicon.ico')
def favicon():
return send_from_directory(os.path.join(app.root_path, 'assets'),
'favicon.ico',mimetype='image/vnd.microsoft.icon')

if __name__ == '__main__':
app.run(debug=False)

0 comments on commit 8f40bee

Please sign in to comment.