web/admin: always override send method instead of assigning (#5426)
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
@ -86,7 +86,7 @@ export class OutpostForm extends ModelForm<Outpost, string> {
|
||||
}
|
||||
}
|
||||
|
||||
send = (data: Outpost): Promise<Outpost> => {
|
||||
async send(data: Outpost): Promise<Outpost> {
|
||||
if (this.instance) {
|
||||
return new OutpostsApi(DEFAULT_CONFIG).outpostsInstancesUpdate({
|
||||
uuid: this.instance.pk || "",
|
||||
@ -97,7 +97,7 @@ export class OutpostForm extends ModelForm<Outpost, string> {
|
||||
outpostRequest: data,
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
renderForm(): TemplateResult {
|
||||
return html`<form class="pf-c-form pf-m-horizontal">
|
||||
|
||||
@ -34,7 +34,7 @@ export class ServiceConnectionDockerForm extends ModelForm<DockerServiceConnecti
|
||||
}
|
||||
}
|
||||
|
||||
send = (data: DockerServiceConnection): Promise<DockerServiceConnection> => {
|
||||
async send(data: DockerServiceConnection): Promise<DockerServiceConnection> {
|
||||
if (this.instance) {
|
||||
return new OutpostsApi(DEFAULT_CONFIG).outpostsServiceConnectionsDockerUpdate({
|
||||
uuid: this.instance.pk || "",
|
||||
@ -45,7 +45,7 @@ export class ServiceConnectionDockerForm extends ModelForm<DockerServiceConnecti
|
||||
dockerServiceConnectionRequest: data,
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
renderForm(): TemplateResult {
|
||||
return html`<form class="pf-c-form pf-m-horizontal">
|
||||
|
||||
@ -32,7 +32,7 @@ export class ServiceConnectionKubernetesForm extends ModelForm<
|
||||
}
|
||||
}
|
||||
|
||||
send = (data: KubernetesServiceConnection): Promise<KubernetesServiceConnection> => {
|
||||
async send(data: KubernetesServiceConnection): Promise<KubernetesServiceConnection> {
|
||||
if (this.instance) {
|
||||
return new OutpostsApi(DEFAULT_CONFIG).outpostsServiceConnectionsKubernetesUpdate({
|
||||
uuid: this.instance.pk || "",
|
||||
@ -43,7 +43,7 @@ export class ServiceConnectionKubernetesForm extends ModelForm<
|
||||
kubernetesServiceConnectionRequest: data,
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
renderForm(): TemplateResult {
|
||||
return html`<form class="pf-c-form pf-m-horizontal">
|
||||
|
||||
Reference in New Issue
Block a user