mirror of https://github.com/zulip/zulip.git
billing: Use PATCH requests for update plan for remote instances.
This fixes the update requests for billing frequency and other requests not working on billing page for cloud customers.
This commit is contained in:
parent
1a063986e3
commit
00f4f8cb04
|
@ -218,8 +218,8 @@ def update_plan(
|
||||||
return json_success(request)
|
return json_success(request)
|
||||||
|
|
||||||
|
|
||||||
@authenticated_remote_realm_management_endpoint
|
|
||||||
@has_request_variables
|
@has_request_variables
|
||||||
|
@authenticated_remote_realm_management_endpoint
|
||||||
def update_plan_for_remote_realm(
|
def update_plan_for_remote_realm(
|
||||||
request: HttpRequest,
|
request: HttpRequest,
|
||||||
billing_session: RemoteRealmBillingSession,
|
billing_session: RemoteRealmBillingSession,
|
||||||
|
@ -244,8 +244,8 @@ def update_plan_for_remote_realm(
|
||||||
return json_success(request)
|
return json_success(request)
|
||||||
|
|
||||||
|
|
||||||
@authenticated_remote_server_management_endpoint
|
|
||||||
@has_request_variables
|
@has_request_variables
|
||||||
|
@authenticated_remote_server_management_endpoint
|
||||||
def update_plan_for_remote_server(
|
def update_plan_for_remote_server(
|
||||||
request: HttpRequest,
|
request: HttpRequest,
|
||||||
billing_session: RemoteServerBillingSession,
|
billing_session: RemoteServerBillingSession,
|
||||||
|
|
|
@ -29,7 +29,7 @@ export function create_update_current_cycle_license_request(): void {
|
||||||
`/json${billing_base_url}/billing/plan`,
|
`/json${billing_base_url}/billing/plan`,
|
||||||
"current-license-change",
|
"current-license-change",
|
||||||
[],
|
[],
|
||||||
"post",
|
"PATCH",
|
||||||
() => {
|
() => {
|
||||||
window.location.replace(
|
window.location.replace(
|
||||||
`${billing_base_url}/billing/?success_message=` +
|
`${billing_base_url}/billing/?success_message=` +
|
||||||
|
@ -54,7 +54,7 @@ export function create_update_next_cycle_license_request(): void {
|
||||||
`/json${billing_base_url}/billing/plan`,
|
`/json${billing_base_url}/billing/plan`,
|
||||||
"next-license-change",
|
"next-license-change",
|
||||||
[],
|
[],
|
||||||
"post",
|
"PATCH",
|
||||||
() => {
|
() => {
|
||||||
window.location.replace(
|
window.location.replace(
|
||||||
`${billing_base_url}/billing/?success_message=` +
|
`${billing_base_url}/billing/?success_message=` +
|
||||||
|
@ -193,7 +193,7 @@ export function initialize(): void {
|
||||||
`/json${billing_base_url}/billing/plan`,
|
`/json${billing_base_url}/billing/plan`,
|
||||||
"planchange",
|
"planchange",
|
||||||
[],
|
[],
|
||||||
"post",
|
"PATCH",
|
||||||
() =>
|
() =>
|
||||||
window.location.replace(
|
window.location.replace(
|
||||||
`${billing_base_url}/billing/?success_message=` +
|
`${billing_base_url}/billing/?success_message=` +
|
||||||
|
@ -208,7 +208,7 @@ export function initialize(): void {
|
||||||
`/json${billing_base_url}/billing/plan`,
|
`/json${billing_base_url}/billing/plan`,
|
||||||
"planchange",
|
"planchange",
|
||||||
[],
|
[],
|
||||||
"post",
|
"PATCH",
|
||||||
() =>
|
() =>
|
||||||
window.location.replace(
|
window.location.replace(
|
||||||
`${billing_base_url}/billing/?success_message=` +
|
`${billing_base_url}/billing/?success_message=` +
|
||||||
|
@ -225,7 +225,7 @@ export function initialize(): void {
|
||||||
`/json${billing_base_url}/billing/plan`,
|
`/json${billing_base_url}/billing/plan`,
|
||||||
"planchange",
|
"planchange",
|
||||||
[],
|
[],
|
||||||
"post",
|
"PATCH",
|
||||||
() =>
|
() =>
|
||||||
window.location.replace(
|
window.location.replace(
|
||||||
`${billing_base_url}/billing/?success_message=` +
|
`${billing_base_url}/billing/?success_message=` +
|
||||||
|
@ -342,7 +342,7 @@ export function initialize(): void {
|
||||||
};
|
};
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
void $.ajax({
|
void $.ajax({
|
||||||
type: "post",
|
type: "PATCH",
|
||||||
url: `/json${billing_base_url}/billing/plan`,
|
url: `/json${billing_base_url}/billing/plan`,
|
||||||
data,
|
data,
|
||||||
success() {
|
success() {
|
||||||
|
|
Loading…
Reference in New Issue