Refactor <DomainBlocks> to TypeScript (#34347)

Co-authored-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
Eugen Rochko 2025-04-02 14:31:39 +02:00 committed by GitHub
parent e2ef173b82
commit 2c70c28bbb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 145 additions and 233 deletions

View file

@ -0,0 +1,13 @@
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),
};
};