2024-06-25 15:45:41 +02:00
|
|
|
import { apiRequestPost } from 'flavours/glitch/api';
|
2024-05-23 11:50:13 +02:00
|
|
|
import type { ApiRelationshipJSON } from 'flavours/glitch/api_types/relationships';
|
|
|
|
|
|
|
|
export const apiSubmitAccountNote = (id: string, value: string) =>
|
2024-06-25 15:45:41 +02:00
|
|
|
apiRequestPost<ApiRelationshipJSON>(`v1/accounts/${id}/note`, {
|
2024-06-25 18:53:03 +02:00
|
|
|
comment: value,
|
2024-05-23 11:50:13 +02:00
|
|
|
});
|
2024-12-03 10:42:52 +01:00
|
|
|
|
|
|
|
export const apiFollowAccount = (
|
|
|
|
id: string,
|
|
|
|
params?: {
|
|
|
|
reblogs: boolean;
|
|
|
|
},
|
|
|
|
) =>
|
|
|
|
apiRequestPost<ApiRelationshipJSON>(`v1/accounts/${id}/follow`, {
|
|
|
|
...params,
|
|
|
|
});
|
|
|
|
|
|
|
|
export const apiUnfollowAccount = (id: string) =>
|
|
|
|
apiRequestPost<ApiRelationshipJSON>(`v1/accounts/${id}/unfollow`);
|