2020-11-27 06:36:02 +00:00
|
|
|
import { Mongo } from "meteor/mongo";
|
|
|
|
|
|
|
|
let Players = new Mongo.Collection("players");
|
|
|
|
|
2020-11-27 07:34:12 +00:00
|
|
|
// TODO: there's probably a better way to do this
|
|
|
|
try {
|
|
|
|
let collection = Players.rawCollection();
|
|
|
|
collection.ensureIndex({ name: 1, roomId: 1, }, { unique: true });
|
|
|
|
} catch (e) {
|
|
|
|
|
|
|
|
}
|
2020-11-27 06:36:02 +00:00
|
|
|
|
|
|
|
export default Players;
|