mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-14 08:19:05 +00:00
Port 2c70c28bbb to glitch-soc
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
14 lines
310 B
TypeScript
14 lines
310 B
TypeScript
import api, { getLinks } from 'flavours/glitch/api';
|
|
|
|
export const apiGetDomainBlocks = async (url?: string) => {
|
|
const response = await api().request<string[]>({
|
|
method: 'GET',
|
|
url: url ?? '/api/v1/domain_blocks',
|
|
});
|
|
|
|
return {
|
|
domains: response.data,
|
|
links: getLinks(response),
|
|
};
|
|
};
|