Finishes now use string instead of IDs.

This commit is contained in:
BurnyLlama 2021-09-29 21:43:41 +02:00
parent 555bea83ff
commit c97f75a982
2 changed files with 4 additions and 4 deletions

View File

@ -1,11 +1,11 @@
import mongoose from 'mongoose' import mongoose from 'mongoose'
const Finish = new mongoose.Schema({ const Finish = new mongoose.Schema({
map: { type: mongoose.Schema.ObjectId, ref: 'Level' }, map: String,
time: Number, time: Number,
date: Date, date: Date,
serverLocation: String, serverLocation: String,
player: { type: mongoose.Schema.ObjectId, ref: 'Player' } player: String
}) })
export default mongoose.model("Finish", Finish) export default mongoose.model("Finish", Finish)

View File

@ -1,11 +1,11 @@
import mongoose from 'mongoose' import mongoose from 'mongoose'
const TeamFinish = new mongoose.Schema({ const TeamFinish = new mongoose.Schema({
map: { type: mongoose.Schema.ObjectId, ref: 'Level' }, map: String,
time: Number, time: Number,
date: Date, date: Date,
serverLocation: String, serverLocation: String,
players: [{ type: mongoose.Schema.ObjectId, ref: 'Player' }] players: [ String ]
}) })
export default mongoose.model("TeamFinish", TeamFinish) export default mongoose.model("TeamFinish", TeamFinish)