[Glitch] Refactor <DomainBlocks> to TypeScript
Port 2c70c28bbb to glitch-soc
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
1 parent
fafd384311
commit
3fcbad3e48
8 files changed
+144
-233
No files matched your search
@@ -0,0 +1,13 @@
|
||||
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),
|
||||
};
|
||||
};
|
||||
Reference in new issue
Block a user