# Test storeId isolation without changing cloud function # 1. Test register action (bind a dummy taskId to storeId="openclaw") Write-Host "=== Test register (storeId isolation) ===" -ForegroundColor Cyan $body1 = @{ id = "sWvRr8RvPT" _ApplicationId = "ncloudmaster" action = "register" taskId = "openclaw-test-001" storeId = "openclaw" caseId = "test-case" caseName = "OpenClaw Test" } | ConvertTo-Json -Compress try { $r1 = Invoke-RestMethod -Uri "https://server.fmode.cn/api/functions" -Method POST -ContentType "application/json" -Body $body1 -TimeoutSec 15 Write-Host "Response:" -ForegroundColor Green $r1 | ConvertTo-Json -Depth 3 } catch { Write-Host "Error: $($_.Exception.Message)" -ForegroundColor Red } Write-Host "" # 2. Test list with storeId filter Write-Host "=== Test list with storeId=openclaw ===" -ForegroundColor Cyan $body2 = @{ id = "sWvRr8RvPT" _ApplicationId = "ncloudmaster" action = "list" storeId = "openclaw" page = 1 pageSize = 5 } | ConvertTo-Json -Compress try { $r2 = Invoke-RestMethod -Uri "https://server.fmode.cn/api/functions" -Method POST -ContentType "application/json" -Body $body2 -TimeoutSec 15 Write-Host "Response:" -ForegroundColor Green $r2 | ConvertTo-Json -Depth 3 } catch { Write-Host "Error: $($_.Exception.Message)" -ForegroundColor Red } Write-Host "" # 3. Test list WITHOUT storeId (should see all videos) Write-Host "=== Test list without storeId (all videos) ===" -ForegroundColor Cyan $body3 = @{ id = "sWvRr8RvPT" _ApplicationId = "ncloudmaster" action = "list" page = 1 pageSize = 3 } | ConvertTo-Json -Compress try { $r3 = Invoke-RestMethod -Uri "https://server.fmode.cn/api/functions" -Method POST -ContentType "application/json" -Body $body3 -TimeoutSec 15 Write-Host "Total (all): $($r3.total)" -ForegroundColor Green } catch { Write-Host "Error: $($_.Exception.Message)" -ForegroundColor Red }