Small refactor.
This commit is contained in:
parent
a00cca43be
commit
440265b352
1 changed files with 5 additions and 3 deletions
|
@ -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()
|
||||
|
||||
|
|
Loading…
Reference in a new issue