Skip to content

Commit 805187f

Browse files
author
ExpDev07
committed
"/" redirects to GitHub project page.
1 parent 24c8902 commit 805187f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

app/routes/__init__.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
1+
from flask import redirect, current_app as app
2+
13
# API version 1.
24
from .v1 import confirmed, deaths, recovered, all
35

46
# API version 2.
5-
from .v2 import locations, latest
7+
from .v2 import locations, latest
8+
9+
# Redirect to project page on index.
10+
@app.route('/')
11+
def index():
12+
return redirect('https://github.com/ExpDev07/coronavirus-tracker-api', 302)

0 commit comments

Comments
 (0)