search hashtag withought symbol #

This commit is contained in:
Nicolas Constant 2018-11-03 15:03:49 -04:00
parent 503a209898
commit fda762f50d
No known key found for this signature in database
GPG Key ID: 1E9F677FB01A5688
1 changed files with 1 additions and 0 deletions

View File

@ -112,6 +112,7 @@ export class MastodonService {
}
search(account: AccountInfo, query: string, resolve: boolean = false): Promise<Results>{
if(query[0] === '#') query = query.substr(1);
const route = `https://${account.instance}${this.apiRoutes.search}?q=${query}&resolve=${resolve}`;
const headers = new HttpHeaders({ 'Authorization': `Bearer ${account.token.access_token}` });
return this.httpClient.get<Results>(route, { headers: headers }).toPromise()