From ab9818d18f947ad44653069cb20dfba6c7660c0d Mon Sep 17 00:00:00 2001 From: Tom Butcher Date: Sat, 27 Dec 2025 16:18:11 +0000 Subject: [PATCH] Added result logging. --- .../Dashboard/Developer/ApiContextDebug.jsx | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/components/Dashboard/Developer/ApiContextDebug.jsx b/src/components/Dashboard/Developer/ApiContextDebug.jsx index f79cf49..fe18e2c 100644 --- a/src/components/Dashboard/Developer/ApiContextDebug.jsx +++ b/src/components/Dashboard/Developer/ApiContextDebug.jsx @@ -144,6 +144,7 @@ const ApiContextDebug = () => { ) msgApi.destroy() msgApi.success('fetchObject test completed') + logger.debug('fetchObject test completed', result) } catch (err) { msgApi.destroy() msgApi.error('fetchObject test failed') @@ -160,6 +161,7 @@ const ApiContextDebug = () => { }) msgApi.destroy() msgApi.success('fetchObjects test completed') + logger.debug('fetchObjects test completed', result) } catch (err) { msgApi.destroy() msgApi.error('fetchObjects test failed') @@ -196,6 +198,7 @@ const ApiContextDebug = () => { ) msgApi.destroy() msgApi.success('fetchObjectLock test completed') + logger.debug('fetchObjectLock test completed', result) } catch (err) { msgApi.destroy() msgApi.error('fetchObjectLock test failed') @@ -217,6 +220,7 @@ const ApiContextDebug = () => { ) msgApi.destroy() msgApi.success('updateObject test completed') + logger.debug('updateObject test completed', result) } catch (err) { msgApi.destroy() msgApi.error('updateObject test failed') @@ -234,6 +238,7 @@ const ApiContextDebug = () => { const result = await createObject(testInputs.objectType, testData) msgApi.destroy() msgApi.success('createObject test completed') + logger.debug('createObject test completed', result) } catch (err) { msgApi.destroy() msgApi.error('createObject test failed') @@ -250,6 +255,7 @@ const ApiContextDebug = () => { ) msgApi.destroy() msgApi.success('deleteObject test completed') + logger.debug('deleteObject test completed', result) } catch (err) { msgApi.destroy() msgApi.error('deleteObject test failed') @@ -268,6 +274,7 @@ const ApiContextDebug = () => { const result = await fetchObjectsByProperty(testInputs.objectType, params) msgApi.destroy() msgApi.success('fetchObjectsByProperty test completed') + logger.debug('fetchObjectsByProperty test completed', result) } catch (err) { msgApi.destroy() msgApi.error('fetchObjectsByProperty test failed') @@ -281,6 +288,7 @@ const ApiContextDebug = () => { const result = await fetchSpotlightData(testInputs.query) msgApi.destroy() msgApi.success('fetchSpotlightData test completed') + logger.debug('fetchSpotlightData test completed', result) } catch (err) { msgApi.destroy() msgApi.error('fetchSpotlightData test failed') @@ -291,13 +299,14 @@ const ApiContextDebug = () => { const testfetchFileContent = async () => { try { msgApi.loading('Testing fetchFileContent...', 0) - await fetchFileContent( + const result = await fetchFileContent( testInputs.objectId, 'gcodefile', testInputs.fileName ) msgApi.destroy() msgApi.success('fetchFileContent test completed') + logger.debug('fetchFileContent test completed', result) } catch (err) { msgApi.destroy() msgApi.error('fetchFileContent test failed') @@ -316,6 +325,7 @@ const ApiContextDebug = () => { testInputs.scale, (result) => { msgApi.destroy() + logger.debug('fetchTemplatePreview test completed', result) if (result.success) { msgApi.success('fetchTemplatePreview test completed') } else { @@ -336,6 +346,7 @@ const ApiContextDebug = () => { const result = await fetchNotes(testInputs.parentId) msgApi.destroy() msgApi.success('fetchNotes test completed') + logger.debug('fetchNotes test completed', result) } catch (err) { msgApi.destroy() msgApi.error('fetchNotes test failed') @@ -349,6 +360,7 @@ const ApiContextDebug = () => { fetchHostOTP(testInputs.hostId, (result) => { msgApi.destroy() + logger.debug('fetchHostOTP test completed', result) if (result.otp) { msgApi.success('fetchHostOTP test completed: ' + result.otp) } else { @@ -372,6 +384,7 @@ const ApiContextDebug = () => { testInputs.action, (result) => { msgApi.destroy() + logger.debug('sendObjectAction test completed', result) if (result.success) { msgApi.success('sendObjectAction test completed') } else {