1
0
mirror of https://github.com/funamitech/mastodon synced 2024-12-14 14:49:01 +09:00
YuruToot/app/javascript/flavours/glitch/actions/account_notes.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

10 lines
378 B
TypeScript

import { apiSubmitAccountNote } from 'flavours/glitch/api/accounts';
import { createDataLoadingThunk } from 'flavours/glitch/store/typed_functions';
export const submitAccountNote = createDataLoadingThunk(
'account_note/submit',
(accountId: string, note: string) => apiSubmitAccountNote(accountId, note),
(relationship) => ({ relationship }),
{ skipLoading: true },
);