1
0
Fork 0
mirror of synced 2024-09-19 02:39:37 +12:00

Small refactor.

This commit is contained in:
Sam Rose 2024-09-06 10:26:06 +01:00
parent a00cca43be
commit 440265b352
No known key found for this signature in database

View file

@ -103,6 +103,8 @@ class ZipBuilder {
}
export async function bugReport(ctx: UserCtx<BugReportRequest>) {
const { browserUrl, clientApiCalls } = ctx.request.body
const zip = ZipBuilder.inTmpDir("bug-report")
if (logging.tail !== undefined) {
@ -112,11 +114,11 @@ export async function bugReport(ctx: UserCtx<BugReportRequest>) {
zip.json("user.json", ctx.user)
zip.json("diagnostics.json", getDiagnostics())
if (ctx.request.body.clientApiCalls) {
zip.json("client-api-calls.json", ctx.request.body.clientApiCalls)
if (clientApiCalls) {
zip.json("client-api-calls.json", clientApiCalls)
}
zip.json("meta.json", { browserUrl: ctx.request.body.browserUrl })
zip.json("meta.json", { browserUrl })
const path = await zip.build()