check-user.js 1.1 KB

1234567891011121314151617181920212223242526
  1. const headers = {
  2. 'X-Parse-Application-Id': 'ncloudmaster',
  3. 'X-Parse-Master-Key': 'SnkK12*&sunq2#@20!'
  4. };
  5. const BASE = 'https://server.fmode.cn/parse/classes';
  6. (async () => {
  7. // 1. 查看旧记录 ZXI7y9lVLt 的完整数据
  8. console.log('=== APIGAuth ZXI7y9lVLt ===');
  9. const r1 = await fetch(BASE + '/APIGAuth/ZXI7y9lVLt', { headers });
  10. const d1 = await r1.json();
  11. console.log(JSON.stringify(d1, null, 2));
  12. // 2. 模拟回退查询:只按 api 查(不带 user)
  13. const apigId = d1.api?.objectId || 'Vu33KNB0y';
  14. console.log('\n=== Fallback: query by api only (order: -count) ===');
  15. const w = JSON.stringify({ api: { __type: 'Pointer', className: 'APIG', objectId: apigId } });
  16. const r2 = await fetch(BASE + '/APIGAuth?where=' + encodeURIComponent(w) + '&order=-count&limit=10', { headers });
  17. const d2 = await r2.json();
  18. console.log('found:', d2.results?.length);
  19. (d2.results || []).forEach(r => console.log(
  20. r.objectId, '| count:', r.count, '| used:', r.used,
  21. '| user:', r.user?.objectId || '-',
  22. '| company:', r.company?.objectId || '-'
  23. ));
  24. })();