forked from glitch-soc/mastodon
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fc80839
commit 30712c4
Showing
578 changed files
with
71,749 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import type { ApiRelationshipJSON } from 'flavours/blobfox/api_types/relationships'; | ||
import { createAppAsyncThunk } from 'flavours/blobfox/store/typed_functions'; | ||
|
||
import api from '../api'; | ||
|
||
export const submitAccountNote = createAppAsyncThunk( | ||
'account_note/submit', | ||
async (args: { id: string; value: string }, { getState }) => { | ||
const response = await api(getState).post<ApiRelationshipJSON>( | ||
`/api/v1/accounts/${args.id}/note`, | ||
{ | ||
comment: args.value, | ||
}, | ||
); | ||
|
||
return { relationship: response.data }; | ||
}, | ||
); |
Oops, something went wrong.