Proposal: a modern & typed way of writing Redux actions doing API requests (#30270)
This commit is contained in:
1 parent
3a862439df
commit
10ec421dd4
14 files changed
+281
-125
No files matched your search
@@ -0,0 +1,7 @@
|
||||
import { apiRequest } from 'mastodon/api';
|
||||
import type { ApiRelationshipJSON } from 'mastodon/api_types/relationships';
|
||||
|
||||
export const apiSubmitAccountNote = (id: string, value: string) =>
|
||||
apiRequest<ApiRelationshipJSON>('post', `/api/v1/accounts/${id}/note`, {
|
||||
comment: value,
|
||||
});
|
||||
Reference in new issue
Block a user