generic-edit-modal: Use PATCH instead of PUT when edit

So that the relational field, such as batch.tenant, will not be cleared
when we save.
This commit is contained in:
Fam Zheng 2024-12-19 21:11:28 +00:00
parent b79b251162
commit f75a0f09c1

View File

@ -79,7 +79,7 @@ export default {
if (this.create) { if (this.create) {
await this.$root.api_post(this.uri, data); await this.$root.api_post(this.uri, data);
} else { } else {
await this.$root.api_put(this.uri, data); await this.$root.api_patch(this.uri, data);
} }
this.close(true); this.close(true);
} catch (e) { } catch (e) {