fix: clear search on going to main page
This commit is contained in:
@@ -9,7 +9,6 @@ import { IRulibDetailResult } from "./rulib.detail.dto";
|
||||
import { IRuLIBPopular } from "./rulib.popular.dto";
|
||||
import { IRulibSearchResult } from "./rulib.search.dto";
|
||||
|
||||
//TODO: Make abstract classes
|
||||
@Injectable({
|
||||
providedIn: "root",
|
||||
})
|
||||
@@ -102,7 +101,7 @@ export class LibSocialParserService extends Parser {
|
||||
|
||||
getPopular(): Observable<IRuLIBPopular[]> {
|
||||
return this.http
|
||||
.get<{ data: { popular: [] } }>(`${this.url}/api/`, {
|
||||
.get<{ data: { popular: IRuLIBPopular[] } }>(`${this.url}/api/`, {
|
||||
headers: {
|
||||
Authorization: "Bearer " + this.rulibAuthService.getToken(),
|
||||
"Site-Id": this.site_id,
|
||||
@@ -110,7 +109,7 @@ export class LibSocialParserService extends Parser {
|
||||
})
|
||||
.pipe(
|
||||
map((data) => {
|
||||
const res = data.data.popular as IRuLIBPopular[];
|
||||
const res = data.data.popular;
|
||||
return res;
|
||||
}),
|
||||
catchError((error) => throwError(() => `Now found ${error}`)),
|
||||
|
||||
Reference in New Issue
Block a user