add filters
This commit is contained in:
@@ -110,9 +110,14 @@ export const fetchArticles = createAsyncThunk(
|
||||
try {
|
||||
const params: any = { page, pageSize };
|
||||
if (tags && tags.length > 0) params.tags = tags;
|
||||
|
||||
const response = await axios.get<ArticlesResponse>('/articles', {
|
||||
params,
|
||||
paramsSerializer: {
|
||||
indexes: null,
|
||||
},
|
||||
});
|
||||
|
||||
return response.data;
|
||||
} catch (err: any) {
|
||||
return rejectWithValue(
|
||||
|
||||
Reference in New Issue
Block a user