(params: {
path: string;
content: string;
etag?: string;
lastModified?: string;
})
| 193 | } |
| 194 | |
| 195 | export async function updateFile(params: { |
| 196 | path: string; |
| 197 | content: string; |
| 198 | etag?: string; |
| 199 | lastModified?: string; |
| 200 | }): Promise<RemoteFile> { |
| 201 | return requestJson<RemoteFile>('/api/file', { |
| 202 | method: 'PUT', |
| 203 | body: JSON.stringify(params), |
| 204 | }); |
| 205 | } |
| 206 | |
| 207 | export async function createFile(path: string, content = ''): Promise<RemoteFile> { |
| 208 | return requestJson<RemoteFile>('/api/file', { |
no test coverage detected