nas/app/javascript/mastodon/api/domain_blocks.ts
Eugen Rochko 2c70c28bbb
Refactor <DomainBlocks> to TypeScript (#34347)
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2025-04-02 12:31:39 +00:00

13 lines
303 B
TypeScript

import api, { getLinks } from 'mastodon/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),
};
};