add newlines

This commit is contained in:
Simon Knott 2024-11-12 14:50:46 +01:00
parent 592f7cc2e3
commit d3e9656872
No known key found for this signature in database
GPG key ID: 8CEDC00028084AEC

View file

@ -147,11 +147,13 @@ function formatUrl(trace: string, server: TraceViewerServerBackend) {
export class TraceViewerServerBackend {
constructor(private readonly baseUrl: string) {}
getFileURL(path: string): URL {
const url = new URL('trace/file', this.baseUrl);
url.searchParams.set('path', path);
return url;
}
async readFile(path: string): Promise<Response | undefined> {
const response = await fetch(this.getFileURL(path));
if (response.status === 404)