Job 1788306089501

Command: findstr /N /I /C:"function doGet" /C:"function doPost" /C:"SpreadsheetApp" /C:"PropertiesService" /C:"commands" /C:"results" /C:"relay_key" ..\apps-script\Code.gs
Directory: projects
Status: SUCCESS
Exit code: 0

Cancel Job Rerun Command Refresh

2:const COMMANDS_SHEET = 'commands';
3:const RESULTS_SHEET = 'results';
8:function doGet(e) {
12:function doPost(e) {
27:  const key = (body && (body.relay_key || body.key)) || params.relay_key || params.key || '';
49:  const expected = getStateValue_('relay_key') || PropertiesService.getScriptProperties().getProperty('BRIDGE_RELAY_KEY');
54:  const sheet = sheet_(COMMANDS_SHEET);
95:  const resultSheet = sheet_(RESULTS_SHEET);
97:  resultSheet.appendRow([resultId, commandId, completedAt, status, httpStatus, resultText, errorText, durationMs, sha, truncated]);
99:  const commandSheet = sheet_(COMMANDS_SHEET);
100:  const rows = commandSheet.getDataRange().getValues();
104:      commandSheet.getRange(r + 1, col.status + 1).setValue(status);
105:      commandSheet.getRange(r + 1, col.completed_at + 1).setValue(completedAt);
106:      commandSheet.getRange(r + 1, col.result_ref + 1).setValue(resultId);
107:      commandSheet.getRange(r + 1, col.error + 1).setValue(errorText);
132:  const ss = SpreadsheetApp.openById(SPREADSHEET_ID);
133:  ensureSheet_(ss, COMMANDS_SHEET, ['id', 'created_at', 'action', 'payload_json', 'status', 'confirm', 'claimed_at', 'completed_at', 'result_ref', 'error', 'attempts', 'notes']);
134:  ensureSheet_(ss, RESULTS_SHEET, ['id', 'command_id', 'completed_at', 'status', 'http_status', 'result_text', 'error', 'duration_ms', 'result_sha256', 'truncated']);
155:  const sh = SpreadsheetApp.openById(SPREADSHEET_ID).getSheetByName(name);