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