Skip to content

Commit

Permalink
Fixed imports and added debugging route.
Browse files Browse the repository at this point in the history
  • Loading branch information
chsou committed Oct 17, 2024
1 parent 996ee46 commit 1ad4090
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion samples/multi_tenant_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from flask import Flask, request, jsonify
from http.client import HTTPConnection

from _base_api import UnauthorizedError
from c8y_api._base_api import UnauthorizedError
from c8y_api.app import MultiTenantCumulocityApp


Expand Down Expand Up @@ -52,6 +52,15 @@ def health():
return jsonify({'status': 'ok'})


@webapp.route("/debug")
def debug():
"""Return debug information."""
return jsonify({
'headers': dict(request.headers),
'cookies': dict(request.cookies),
})


@webapp.route("/tenant")
def tenant_info():
"""Return subscribed tenant's ID, username and devices it has access to."""
Expand Down

0 comments on commit 1ad4090

Please sign in to comment.