mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-25 11:56:36 +00:00
Convert <Directory> to Typescript / function component (#30829)
This commit is contained in:
15
app/javascript/mastodon/api/directory.ts
Normal file
15
app/javascript/mastodon/api/directory.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { apiRequestGet } from 'mastodon/api';
|
||||
import type { ApiAccountJSON } from 'mastodon/api_types/accounts';
|
||||
|
||||
export const apiGetDirectory = (
|
||||
params: {
|
||||
order: string;
|
||||
local: boolean;
|
||||
offset?: number;
|
||||
},
|
||||
limit = 20,
|
||||
) =>
|
||||
apiRequestGet<ApiAccountJSON[]>('v1/directory', {
|
||||
...params,
|
||||
limit,
|
||||
});
|
||||
Reference in New Issue
Block a user