( input: ToggleProjectFavoriteInput, )
| 130 | } |
| 131 | |
| 132 | export async function toggleProjectFavoriteOnServer( |
| 133 | input: ToggleProjectFavoriteInput, |
| 134 | ): Promise<ProjectMutationResponse> { |
| 135 | return requestJson<ProjectMutationResponse>( |
| 136 | new URL(`/api/projects/${input.id}`, API_BASE_URL), |
| 137 | { |
| 138 | method: 'PATCH', |
| 139 | headers: { |
| 140 | 'content-type': 'application/json', |
| 141 | }, |
| 142 | body: JSON.stringify({ isFavorite: input.isFavorite }), |
| 143 | }, |
| 144 | `Failed to update project ${input.id}`, |
| 145 | ) |
| 146 | } |
| 147 | |
| 148 | export async function armNextProjectMutationFailureOnServer(): Promise<void> { |
| 149 | await requestJson<{ ok: true }>( |
no test coverage detected