( input: CreateProjectInput, )
| 114 | } |
| 115 | |
| 116 | export async function createProjectOnServer( |
| 117 | input: CreateProjectInput, |
| 118 | ): Promise<ProjectMutationResponse> { |
| 119 | return requestJson<ProjectMutationResponse>( |
| 120 | new URL('/api/projects', API_BASE_URL), |
| 121 | { |
| 122 | method: 'POST', |
| 123 | headers: { |
| 124 | 'content-type': 'application/json', |
| 125 | }, |
| 126 | body: JSON.stringify(input), |
| 127 | }, |
| 128 | 'Failed to create project', |
| 129 | ) |
| 130 | } |
| 131 | |
| 132 | export async function toggleProjectFavoriteOnServer( |
| 133 | input: ToggleProjectFavoriteInput, |
no test coverage detected