Skip to content

Commit

Permalink
Outlook connector - add "X-Connector-Id" (#10)
Browse files Browse the repository at this point in the history
Co-authored-by: EugeneP <epavletsov@itera.ws>
  • Loading branch information
EugeneLightsOn and EugeneP authored Dec 5, 2023
1 parent 5aa06b0 commit 4f70a06
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions outlook/provider/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,6 @@ def create_app() -> connexion.FlaskApp:
flask_app = app.app
config_prefix = os.path.split(os.getcwd())[1].upper()
flask_app.config.from_prefixed_env(config_prefix)
flask_app.config["APP_ID"] = config_prefix

return flask_app
2 changes: 1 addition & 1 deletion outlook/provider/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def search(body):
except UpstreamProviderError as error:
logger.error(f"Upstream provider error: {error.message}")
abort(502, error.message)
return {"results": data}
return {"results": data}, 200, {"X-Connector-Id": app.config.get("APP_ID")}


def apikey_auth(token):
Expand Down

0 comments on commit 4f70a06

Please sign in to comment.