Through fetch filters when sns is misskey
Because Misskye does not have filter
This commit is contained in:
parent
6bde0fc7f9
commit
c446a7a2cd
|
@ -186,10 +186,14 @@ const actions: ActionTree<TimelineSpaceState, RootState> = {
|
|||
* fetchFilters
|
||||
*/
|
||||
fetchFilters: async ({ commit, state, rootState }): Promise<Array<Entity.Filter>> => {
|
||||
const client = generator(state.sns, state.account.baseURL, state.account.accessToken, rootState.App.userAgent)
|
||||
const res = await client.getFilters()
|
||||
commit(MUTATION_TYPES.UPDATE_FILTERS, res.data)
|
||||
return res.data
|
||||
try {
|
||||
const client = generator(state.sns, state.account.baseURL, state.account.accessToken, rootState.App.userAgent)
|
||||
const res = await client.getFilters()
|
||||
commit(MUTATION_TYPES.UPDATE_FILTERS, res.data)
|
||||
return res.data
|
||||
} catch {
|
||||
return []
|
||||
}
|
||||
},
|
||||
/**
|
||||
* fetchInstance
|
||||
|
|
Loading…
Reference in New Issue