更新为api/action/
This commit is contained in:
parent
bf61808503
commit
c8d0c64b33
@ -17,7 +17,7 @@ class CRMInvitation(Page):
|
||||
self.invite_via_email()
|
||||
|
||||
def invite_via_email(self):
|
||||
invite_link = jingrow.utils.get_url(f"/api/method/crm.api.accept_invitation?key={self.key}")
|
||||
invite_link = jingrow.utils.get_url(f"/api/action/crm.api.accept_invitation?key={self.key}")
|
||||
if jingrow.local.dev_server:
|
||||
print(f"Invite link for {self.email}: {invite_link}")
|
||||
|
||||
|
||||
@ -60,7 +60,7 @@ class CRMTwilioSettings(Page):
|
||||
jingrow.throw(_("Twilio API credential creation error."))
|
||||
|
||||
def get_twilio_voice_url(self):
|
||||
url_path = "/api/method/crm.integrations.twilio.api.voice"
|
||||
url_path = "/api/action/crm.integrations.twilio.api.voice"
|
||||
return get_public_url(url_path)
|
||||
|
||||
def get_application(self, twilio, friendly_name=None):
|
||||
|
||||
@ -9,7 +9,7 @@ from crm.integrations.api import get_contact_by_phone_number
|
||||
# Endpoints for webhook
|
||||
|
||||
# Incoming Call:
|
||||
# <site>/api/method/crm.integrations.exotel.handler.handle_request?key=<exotel-webhook-verify-token>
|
||||
# <site>/api/action/crm.integrations.exotel.handler.handle_request?key=<exotel-webhook-verify-token>
|
||||
|
||||
# Exotel Reference:
|
||||
# https://developer.exotel.com/api/
|
||||
@ -152,7 +152,7 @@ def get_status_updater_url():
|
||||
from jingrow.utils.data import get_url
|
||||
|
||||
webhook_verify_token = jingrow.db.get_single_value("CRM Exotel Settings", "webhook_verify_token")
|
||||
return get_url(f"api/method/crm.integrations.exotel.handler.handle_request?key={webhook_verify_token}")
|
||||
return get_url(f"api/action/crm.integrations.exotel.handler.handle_request?key={webhook_verify_token}")
|
||||
|
||||
|
||||
def get_exotel_settings():
|
||||
@ -161,7 +161,7 @@ def get_exotel_settings():
|
||||
|
||||
def validate_request():
|
||||
# workaround security since exotel does not support request signature
|
||||
# /api/method/<exotel-integration-method>?key=<exotel-webhook=verify-token>
|
||||
# /api/action/<exotel-integration-method>?key=<exotel-webhook=verify-token>
|
||||
webhook_verify_token = jingrow.db.get_single_value("CRM Exotel Settings", "webhook_verify_token")
|
||||
key = jingrow.request.args.get("key")
|
||||
is_valid = key and key == webhook_verify_token
|
||||
|
||||
@ -66,11 +66,11 @@ class Twilio:
|
||||
return identity.replace("(at)", "@")
|
||||
|
||||
def get_recording_status_callback_url(self):
|
||||
url_path = "/api/method/crm.integrations.twilio.api.update_recording_info"
|
||||
url_path = "/api/action/crm.integrations.twilio.api.update_recording_info"
|
||||
return get_public_url(url_path)
|
||||
|
||||
def get_update_call_status_callback_url(self):
|
||||
url_path = "/api/method/crm.integrations.twilio.api.update_call_status_info"
|
||||
url_path = "/api/action/crm.integrations.twilio.api.update_call_status_info"
|
||||
return get_public_url(url_path)
|
||||
|
||||
def generate_twilio_dial_response(self, from_number: str, to_number: str):
|
||||
|
||||
@ -90,7 +90,7 @@ class FilesUploadHandler {
|
||||
}
|
||||
}
|
||||
|
||||
xhr.open('POST', '/api/method/upload_file', true)
|
||||
xhr.open('POST', '/api/action/upload_file', true)
|
||||
xhr.setRequestHeader('Accept', 'application/json')
|
||||
|
||||
if (window.csrf_token && window.csrf_token !== '{{ csrf_token }}') {
|
||||
|
||||
@ -566,7 +566,7 @@ async function exportRows() {
|
||||
page_length = list.value.data.total_count
|
||||
}
|
||||
|
||||
let url = `/api/method/jingrow.desk.reportview.export_query?file_format_type=${export_type.value}&title=${props.pagetype}&pagetype=${props.pagetype}&fields=${fields}&filters=${encodeURIComponent(filters)}&order_by=${order_by}&page_length=${page_length}&start=0&view=Report&with_comment_count=1`
|
||||
let url = `/api/action/jingrow.desk.reportview.export_query?file_format_type=${export_type.value}&title=${props.pagetype}&pagetype=${props.pagetype}&fields=${fields}&filters=${encodeURIComponent(filters)}&order_by=${order_by}&page_length=${page_length}&start=0&view=Report&with_comment_count=1`
|
||||
|
||||
// Add selected items parameter if rows are selected
|
||||
if (selectedRows.value?.length && !export_all.value) {
|
||||
|
||||
@ -55,7 +55,7 @@ app.config.globalProperties.$dialog = createDialog
|
||||
|
||||
let socket
|
||||
if (import.meta.env.DEV) {
|
||||
jingrowRequest({ url: '/api/method/crm.www.crm.get_context_for_dev' }).then(
|
||||
jingrowRequest({ url: '/api/action/crm.www.crm.get_context_for_dev' }).then(
|
||||
(values) => {
|
||||
for (let key in values) {
|
||||
window[key] = values[key]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user