Skip to content

Commit 80cca27

Browse files
committed
Removed test for title + author search
Forgot to remove this
1 parent e30db08 commit 80cca27

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/api/apis/OpenLibraryAPI.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,9 @@ export class OpenLibraryAPI extends APIModel {
1919

2020
async searchByTitle(title: string): Promise<MediaTypeModel[]> {
2121
console.log(`MDB | api "${this.apiName}" queried by Title`);
22-
const titlesplit = title.split("++")
23-
if(titlesplit.length !== 1 ){
24-
var searchUrl = `https://openlibrary.org/search.json?title=${encodeURIComponent(titlesplit[0])}&author=${encodeURIComponent(titlesplit[1])}`;
25-
}
26-
else{
27-
var searchUrl = `https://openlibrary.org/search.json?title=${encodeURIComponent(title)}`;
28-
}
22+
23+
const searchUrl = `https://openlibrary.org/search.json?title=${encodeURIComponent(title)}`;
24+
2925
const fetchData = await fetch(searchUrl);
3026
console.debug(fetchData);
3127
if (fetchData.status !== 200) {

0 commit comments

Comments
 (0)