Port 14a781fa24c969a6be4f2ccc3e6e5c9f83db7437 to glitch-soc Signed-off-by: Claire <claire.github-309c@sitedethib.com>
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),
|
|
};
|
|
};
|