Eugen Rochko a8432560ba [Glitch] Add button to load new replies in web UI
Port 14a781fa24c969a6be4f2ccc3e6e5c9f83db7437 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2025-07-23 18:49:25 +02:00

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),
};
};