mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-14 16:28:59 +00:00
[Glitch] Fix createDataLoadingThunk and related actions
Port b6fd14f0e2 to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
@@ -62,12 +62,12 @@ export default function api(withAuthorization = true) {
|
||||
export async function apiRequest<ApiResponse = unknown>(
|
||||
method: Method,
|
||||
url: string,
|
||||
params?: unknown,
|
||||
params?: Record<string, unknown>,
|
||||
) {
|
||||
const { data } = await api().request<ApiResponse>({
|
||||
method,
|
||||
url,
|
||||
params,
|
||||
url: '/api/' + url,
|
||||
data: params,
|
||||
});
|
||||
|
||||
return data;
|
||||
|
||||
Reference in New Issue
Block a user