Search Result Name Not Found

This commit is contained in:
AlphaX-Projects 2022-01-24 04:13:56 +01:00 committed by GitHub
parent c175322d36
commit eeca17b1f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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