clean up js
This commit is contained in:
parent
6369637145
commit
a03de74f0b
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -6,8 +6,6 @@ import DiscussionListState from 'flarum/forum/states/DiscussionListState';
|
||||||
|
|
||||||
export default function extendDiscussionState() {
|
export default function extendDiscussionState() {
|
||||||
override(DiscussionListState.prototype, 'loadPage', async function (this: DiscussionListState, original, page: number = 1) {
|
override(DiscussionListState.prototype, 'loadPage', async function (this: DiscussionListState, original, page: number = 1) {
|
||||||
console.log(this.requestParams());
|
|
||||||
|
|
||||||
if (!this.requestParams()?.filter?.q) return original.call(this, page);
|
if (!this.requestParams()?.filter?.q) return original.call(this, page);
|
||||||
|
|
||||||
const params = this.requestParams();
|
const params = this.requestParams();
|
||||||
|
|
@ -27,8 +25,6 @@ export default function extendDiscussionState() {
|
||||||
const results = await app.request({ params, url, method: 'GET' });
|
const results = await app.request({ params, url, method: 'GET' });
|
||||||
|
|
||||||
// Parse API response into models and push to store
|
// Parse API response into models and push to store
|
||||||
const models = app.store.pushPayload(results);
|
return app.store.pushPayload(results);
|
||||||
|
|
||||||
return models;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Blomstra\Search\Api;
|
||||||
|
|
||||||
|
class Client
|
||||||
|
{
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue