mirror of
https://github.com/wassname/talk.git
synced 2026-07-01 02:33:03 +08:00
7 lines
258 B
JavaScript
7 lines
258 B
JavaScript
const Setting = require('../models/setting');
|
|
const defaults = {id: '1', moderation: 'pre'};
|
|
|
|
Setting.update({id: '1'}, {$setOnInsert: defaults}, {upsert: true}).then(() => {
|
|
throw new Error('It was not able to update settings.');
|
|
}).catch(console.error);
|