Commit 88f7e32e authored by Herman Andersen Dyrkorn's avatar Herman Andersen Dyrkorn
Browse files

comment file

parent 0c7eb4f4
......@@ -6,7 +6,7 @@ from flask_sqlalchemy import SQLAlchemy
from flask_limiter import Limiter
from flask_limiter.util import get_remote_address
# flask application setup, with database, JWT, bcrypt and limiter
app = Flask(__name__)
app.config['SECRET_KEY'] = 'randomchangethisshit'
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///database/database.db'
......@@ -18,7 +18,7 @@ bcrypt = Bcrypt(app)
limiter = Limiter(app, key_func=get_remote_address)
api = Api(app)
# import all classes that is used to create endpoints
from api.endpoints.login import Login
from api.endpoints.user import UserEndpoint
from api.endpoints.location import LocationEndpoint
......@@ -32,6 +32,7 @@ from api.endpoints.salamanders import SalamandersEndpoint
from api.endpoints.findsalamanderinfo import FindSalamanderInfo
# add the imported classes to a route
api.add_resource(Login, "/login")
api.add_resource(UserEndpoint, "/user")
api.add_resource(LocationEndpoint, "/location")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment