From 37a5e0eddb49312e8eef9328010aa4bc10f71bac Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Thu, 14 Nov 2024 17:49:01 +0530 Subject: [PATCH] fix: show PageNotFound page if not fc site --- billing/src/App.vue | 17 +++++++++++++---- billing/src/pages/PageNotFound.vue | 10 ++++++++++ .../frappe_providers/frappecloud_billing.py | 4 ++++ 3 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 billing/src/pages/PageNotFound.vue diff --git a/billing/src/App.vue b/billing/src/App.vue index 58c3a56a61..69356ae8dd 100644 --- a/billing/src/App.vue +++ b/billing/src/App.vue @@ -1,18 +1,27 @@ diff --git a/billing/src/pages/PageNotFound.vue b/billing/src/pages/PageNotFound.vue new file mode 100644 index 0000000000..8ce609d16b --- /dev/null +++ b/billing/src/pages/PageNotFound.vue @@ -0,0 +1,10 @@ + diff --git a/frappe/integrations/frappe_providers/frappecloud_billing.py b/frappe/integrations/frappe_providers/frappecloud_billing.py index e1280bd0c7..96e508c9ad 100644 --- a/frappe/integrations/frappe_providers/frappecloud_billing.py +++ b/frappe/integrations/frappe_providers/frappecloud_billing.py @@ -81,3 +81,7 @@ def api(method, data=None): return request.json().get("message") else: frappe.throw(_("Failed while calling API {0}", method)) + +@frappe.whitelist() +def is_fc_site(): + return frappe.conf.get("fc_communication_secret")