13 lines
298 B
JavaScript
13 lines
298 B
JavaScript
import { Mongo } from "meteor/mongo";
|
|
|
|
let Players = new Mongo.Collection("players");
|
|
|
|
// 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) {
|
|
|
|
}
|
|
|
|
export default Players;
|