import { Meteor } from 'meteor/meteor';
import { check } from 'meteor/check';

import { dbArena } from '/db/dbArena';
import { dbArenaFighters } from '/db/dbArenaFighters';
import { limitSubscription } from '/server/imports/utils/rateLimit';
import { debug } from '/server/imports/utils/debug';

Meteor.publish('arenaInfo', function(arenaId) {
  debug.log('publish arenaInfo', arenaId);
  check(arenaId, String);
  const disableOplog = true;

  return [
    dbArena.find(arenaId, { disableOplog }),
    dbArenaFighters.find({ arenaId }, { fields: { investors: 0 } }, { disableOplog })
  ];
});
// 一分鐘最多20次
limitSubscription('arenaInfo');

@@ -531,16 +531,22 @@
 aId %7D, %7B
+%0A     
  fields:
@@ -547,16 +547,24 @@
 ields: %7B
+%0A       
  investo
@@ -568,18 +568,55 @@
 stors: 0
+,%0A        attackSequence: 0%0A      %7D%0A  
  
-%7D
  %7D, %7B di

修正亂鬥攻擊順序經由 ``arenaInfo`` leak 的問題