mirror of
https://github.com/flarum/framework.git
synced 2024-12-01 14:20:47 +08:00
Update js/src/common/Store.ts
Co-authored-by: David Wheatley <hi@davwheat.dev>
This commit is contained in:
parent
9fc6a2333d
commit
b460b8b5da
|
@ -175,14 +175,12 @@ export default class Store {
|
||||||
|
|
||||||
return app
|
return app
|
||||||
.request<M extends Array<infer _T> ? ApiPayloadPlural : ApiPayloadSingle>(
|
.request<M extends Array<infer _T> ? ApiPayloadPlural : ApiPayloadSingle>(
|
||||||
Object.assign(
|
|
||||||
{
|
{
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
url,
|
url,
|
||||||
params,
|
params,
|
||||||
},
|
...options,
|
||||||
options
|
}
|
||||||
)
|
|
||||||
)
|
)
|
||||||
.then((payload) => {
|
.then((payload) => {
|
||||||
if (payloadIsPlural(payload)) {
|
if (payloadIsPlural(payload)) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user