mirror of
https://github.com/flarum/framework.git
synced 2025-01-31 21:37:04 +08:00
Update js/src/common/Model.ts
Co-authored-by: David Wheatley <hi@davwheat.dev>
This commit is contained in:
parent
5df4a3df49
commit
c18dbbbe53
|
@ -204,14 +204,12 @@ export default abstract class Model {
|
||||||
|
|
||||||
return app
|
return app
|
||||||
.request<ApiPayloadSingle>(
|
.request<ApiPayloadSingle>(
|
||||||
Object.assign(
|
{
|
||||||
{
|
method: this.exists ? 'PATCH' : 'POST',
|
||||||
method: this.exists ? 'PATCH' : 'POST',
|
url: app.forum.attribute('apiUrl') + this.apiEndpoint(),
|
||||||
url: app.forum.attribute('apiUrl') + this.apiEndpoint(),
|
body: request,
|
||||||
body: request,
|
...options,
|
||||||
},
|
},
|
||||||
options
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
.then(
|
.then(
|
||||||
// If everything went well, we'll make sure the store knows that this
|
// If everything went well, we'll make sure the store knows that this
|
||||||
|
|
Loading…
Reference in New Issue
Block a user