mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-13 07:49:29 +00:00
15 lines
425 B
TypeScript
15 lines
425 B
TypeScript
import api, { getAsyncRefreshHeader } from 'flavours/glitch/api';
|
|
import type { ApiContextJSON } from 'flavours/glitch/api_types/statuses';
|
|
|
|
export const apiGetContext = async (statusId: string) => {
|
|
const response = await api().request<ApiContextJSON>({
|
|
method: 'GET',
|
|
url: `/api/v1/statuses/${statusId}/context`,
|
|
});
|
|
|
|
return {
|
|
context: response.data,
|
|
refresh: getAsyncRefreshHeader(response),
|
|
};
|
|
};
|