Search Result Name Not Found
This commit is contained in:
parent
c175322d36
commit
eeca17b1f0
@ -303,14 +303,18 @@ class Websites extends LitElement {
|
||||
async searchResult() {
|
||||
let searchName = this.shadowRoot.getElementById('searchName').value
|
||||
if (searchName.length === 0) {
|
||||
parentEpml.request('showSnackBar', 'Name cannot be empty!')
|
||||
parentEpml.request('showSnackBar', 'Name Can Not Be Empty!')
|
||||
} else {
|
||||
let searchResources = await parentEpml.request('apiCall', {
|
||||
url: `/arbitrary/resources/search?service=${this.service}&query=${searchName}&default=true&limit=5&reverse=false&includestatus=true`
|
||||
})
|
||||
if (this.isEmptyArray(searchResources)) {
|
||||
parentEpml.request('showSnackBar', 'Name Not Found!')
|
||||
} else {
|
||||
this.searchResources = searchResources
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
renderSearchAvatar(searchObj) {
|
||||
let name = searchObj.name
|
||||
|
Loading…
x
Reference in New Issue
Block a user