Skip to content

Commit

Permalink
Use Immutable Record for accounts in Redux state (mastodon#26559)
Browse files Browse the repository at this point in the history
  • Loading branch information
renchap authored Nov 3, 2023
1 parent 9d799d4 commit 3bf2a72
Show file tree
Hide file tree
Showing 65 changed files with 765 additions and 662 deletions.
4 changes: 2 additions & 2 deletions app/javascript/mastodon/actions/account_notes.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import type { ApiRelationshipJSON } from 'mastodon/api_types/relationships';
import { createAppAsyncThunk } from 'mastodon/store/typed_functions';

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,
Expand Down
Loading

0 comments on commit 3bf2a72

Please sign in to comment.