Update view DPELP

This commit is contained in:
Joseph Le 2025-09-26 19:31:34 +10:00
parent abfe83fb29
commit 64e2046402
1 changed files with 3 additions and 1 deletions

View File

@ -343,12 +343,14 @@ Route.post('/api/wiki/page/insert', async ({ request, response }) => {
if(typeof dataPayload === "string")
text = dataPayload.replace(/\\n/g, '\n')
else if(Array.isArray(dataPayload)){
const dataPlatform = dataPayload?.find(el => el.command?.trim() === "show platform")
const DPELP = dataPlatform && !dataPlatform?.output?.includes("Incomplete") ? true : false
text = `<pre>
Line ${lineNumber ?? ""}:
PID: ${pid ?? ""}
VID: ${vid ?? ""}
SN: ${sn ?? ""}
List commands: ${dataPayload.map(value => value.command?.trim()).join(", ")}
Tested mode: ${DPELP? "DPELP" : "DPEL"}
License: ${license ?? ""}
</pre>
`