Merge branch 'fix-tests' into 'develop'

Fix mock in tests

See merge request soapbox-pub/soapbox!2341
environments/review-develop-3zknud/deployments/2806
Chewbacca 2 years ago
commit e7b3af5260

@ -23,7 +23,12 @@ export const getLinks = (response: AxiosResponse): LinkHeader => {
export const getNextLink = (response: AxiosResponse) => {
const nextLink = new LinkHeader(response.headers?.link);
return nextLink.refs.find((ref) => ref.uri)?.uri;
return nextLink.refs.find(link => link.rel === 'next')?.uri;
};
export const getPrevLink = (response: AxiosResponse) => {
const prevLink = new LinkHeader(response.headers?.link);
return prevLink.refs.find(link => link.rel === 'prev')?.uri;
};
export const baseClient = (...params: any[]) => {

Loading…
Cancel
Save