FEATURE: rate limit anon searches per second (#19708)
This commit is contained in:
@@ -63,6 +63,7 @@ export default Controller.extend({
|
||||
resultCount: null,
|
||||
searchTypes: null,
|
||||
selected: [],
|
||||
error: null,
|
||||
|
||||
init() {
|
||||
this._super(...arguments);
|
||||
@@ -382,6 +383,10 @@ export default Controller.extend({
|
||||
model.grouped_search_result = results.grouped_search_result;
|
||||
this.set("model", model);
|
||||
}
|
||||
this.set("error", null);
|
||||
})
|
||||
.catch((e) => {
|
||||
this.set("error", e.jqXHR.responseJSON?.message);
|
||||
})
|
||||
.finally(() => {
|
||||
this.setProperties({
|
||||
|
||||
@@ -163,9 +163,9 @@
|
||||
{{#if this.searchActive}}
|
||||
<h3>{{i18n "search.no_results"}}</h3>
|
||||
|
||||
{{#if this.model.grouped_search_result.error}}
|
||||
{{#if this.error}}
|
||||
<div class="warning">
|
||||
{{this.model.grouped_search_result.error}}
|
||||
{{this.error}}
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user