1
0
mirror of https://github.com/funamitech/mastodon synced 2024-12-14 14:49:01 +09:00
YuruToot/app/javascript/flavours/glitch/api/accounts.ts
Renaud Chaput 8d6058b40a [Glitch] Proposal: a modern & typed way of writing Redux actions doing API requests
Port 10ec421dd4 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2024-05-23 20:33:05 +02:00

8 lines
303 B
TypeScript

import { apiRequest } from 'flavours/glitch/api';
import type { ApiRelationshipJSON } from 'flavours/glitch/api_types/relationships';
export const apiSubmitAccountNote = (id: string, value: string) =>
apiRequest<ApiRelationshipJSON>('post', `/api/v1/accounts/${id}/note`, {
comment: value,
});