17 lines
419 B
JavaScript
17 lines
419 B
JavaScript
import Player from '../../../schemas/Player.js'
|
|
import { connectMongoose } from './mongoForWorkes.js'
|
|
|
|
connectMongoose()
|
|
|
|
export function main(data) {
|
|
return new Promise(
|
|
(resolve, reject) => {
|
|
Player.findOneAndUpdate(
|
|
{ name: data.name },
|
|
{ pointsThisWeek: data.pointsThisWeek }
|
|
).then(
|
|
() => resolve()
|
|
)
|
|
}
|
|
)
|
|
} |