mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-05 21:33:40 +08:00
14 lines
318 B
JavaScript
14 lines
318 B
JavaScript
const MonkeyError = require("../handlers/error");
|
|
const { mongoDB } = require("../init/mongodb");
|
|
|
|
class ConfigDAO {
|
|
|
|
static async saveConfig(uid, config) {
|
|
return await mongoDB()
|
|
.collection("configs")
|
|
.updateOne({ uid }, { $set: { config } }, { upsert: true });
|
|
}
|
|
|
|
}
|
|
|
|
module.exports = ConfigDAO;
|