0
0
Fork 0

Remove the access token from Redux & context (#30275)

This commit is contained in:
Renaud Chaput 2024-05-22 16:45:18 +02:00 committed by GitHub
parent 2c75cf8599
commit 2c5ab8f647
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
35 changed files with 225 additions and 226 deletions

View file

@ -46,7 +46,7 @@ export function submitSearch(type) {
dispatch(fetchSearchRequest(type));
api(getState).get('/api/v2/search', {
api().get('/api/v2/search', {
params: {
q: value,
resolve: signedIn,
@ -99,7 +99,7 @@ export const expandSearch = type => (dispatch, getState) => {
dispatch(expandSearchRequest(type));
api(getState).get('/api/v2/search', {
api().get('/api/v2/search', {
params: {
q: value,
type,
@ -156,7 +156,7 @@ export const openURL = (value, history, onFailure) => (dispatch, getState) => {
dispatch(fetchSearchRequest());
api(getState).get('/api/v2/search', { params: { q: value, resolve: true } }).then(response => {
api().get('/api/v2/search', { params: { q: value, resolve: true } }).then(response => {
if (response.data.accounts?.length > 0) {
dispatch(importFetchedAccounts(response.data.accounts));
history.push(`/@${response.data.accounts[0].acct}`);