Use Immutable Record
for accounts in Redux state (#26559)
This commit is contained in:
parent
9d799d40ba
commit
3bf2a7296e
65 changed files with 765 additions and 662 deletions
|
@ -1,3 +1,4 @@
|
|||
import type { ApiRelationshipJSON } from 'mastodon/api_types/relationships';
|
||||
import { createAppAsyncThunk } from 'mastodon/store/typed_functions';
|
||||
|
||||
import api from '../api';
|
||||
|
@ -5,8 +6,7 @@ import api from '../api';
|
|||
export const submitAccountNote = createAppAsyncThunk(
|
||||
'account_note/submit',
|
||||
async (args: { id: string; value: string }, { getState }) => {
|
||||
// TODO: replace `unknown` with `ApiRelationshipJSON` when it is merged
|
||||
const response = await api(getState).post<unknown>(
|
||||
const response = await api(getState).post<ApiRelationshipJSON>(
|
||||
`/api/v1/accounts/${args.id}/note`,
|
||||
{
|
||||
comment: args.value,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue