(
method: string,
filePath: string | undefined,
user: User,
init: RequestInit = {},
)
| 31 | } |
| 32 | |
| 33 | async function callDav( |
| 34 | method: string, |
| 35 | filePath: string | undefined, |
| 36 | user: User, |
| 37 | init: RequestInit = {}, |
| 38 | ): Promise<Response> { |
| 39 | const url = `http://localhost:8000/dav/${filePath ?? ''}`; |
| 40 | const request = new Request(url, { method, ...init }); |
| 41 | const match = { pathname: { groups: { filePath } } } as unknown as URLPatternResult; |
| 42 | |
| 43 | return await davPage.catchAll!({ request, match, user, isRunningLocally: true }); |
| 44 | } |
| 45 | |
| 46 | const lockRequestBody = |
| 47 | `<?xml version="1.0" encoding="utf-8"?><D:lockinfo xmlns:D="DAV:"><D:lockscope><D:exclusive/></D:lockscope><D:locktype><D:write/></D:locktype><D:owner><D:href>test-owner</D:href></D:owner></D:lockinfo>`; |
no outgoing calls
no test coverage detected