Skip to content

Commit

Permalink
add proper services
Browse files Browse the repository at this point in the history
  • Loading branch information
akariv committed Nov 15, 2023
1 parent 693c9f8 commit fae0f56
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions budgetkey_api/flask_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
from flask_caching import Cache
from flask_session import Session

from .modules import setup_search, setup_query, setup_auth


def add_cache_header(response):
response.cache_control.max_age = 600
Expand Down Expand Up @@ -67,10 +65,13 @@ def create_flask_app(session_file_dir=None, cache_dir=None, services=None):
services = services.split(',')

if 'es' in services:
from .modules import setup_search
setup_search(app)
if 'db' in services:
from .modules import setup_query
setup_query(app, cache)
if 'auth' in services:
from .modules import setup_auth
setup_auth(app)

app.after_request(add_cache_header)
Expand Down

0 comments on commit fae0f56

Please sign in to comment.