mirror of
https://github.com/funamitech/mastodon
synced 2024-12-14 22:59:46 +09:00
3e9298370d
Port 2c5ab8f647
to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
19 lines
527 B
TypeScript
19 lines
527 B
TypeScript
import type { ApiRelationshipJSON } from 'flavours/glitch/api_types/relationships';
|
|
import { createAppAsyncThunk } from 'flavours/glitch/store/typed_functions';
|
|
|
|
import api from '../api';
|
|
|
|
export const submitAccountNote = createAppAsyncThunk(
|
|
'account_note/submit',
|
|
async (args: { id: string; value: string }) => {
|
|
const response = await api().post<ApiRelationshipJSON>(
|
|
`/api/v1/accounts/${args.id}/note`,
|
|
{
|
|
comment: args.value,
|
|
},
|
|
);
|
|
|
|
return { relationship: response.data };
|
|
},
|
|
);
|