Removed test for title + author search

Forgot to remove this
This commit is contained in:
ltctceplrm 2023-12-21 20:35:59 +01:00
parent e30db0897d
commit 80cca27bde

View file

@ -19,13 +19,9 @@ export class OpenLibraryAPI extends APIModel {
async searchByTitle(title: string): Promise<MediaTypeModel[]> {
console.log(`MDB | api "${this.apiName}" queried by Title`);
const titlesplit = title.split("++")
if(titlesplit.length !== 1 ){
var searchUrl = `https://openlibrary.org/search.json?title=${encodeURIComponent(titlesplit[0])}&author=${encodeURIComponent(titlesplit[1])}`;
}
else{
var searchUrl = `https://openlibrary.org/search.json?title=${encodeURIComponent(title)}`;
}
const searchUrl = `https://openlibrary.org/search.json?title=${encodeURIComponent(title)}`;
const fetchData = await fetch(searchUrl);
console.debug(fetchData);
if (fetchData.status !== 200) {