Fixed an async issue

This commit is contained in:
ION606
2022-07-31 10:06:36 +03:00
parent 47b0040f62
commit e1c028789a
+1 -1
View File
@@ -142,7 +142,7 @@ app.post('/sendData', async (req, res) => {
try {
const pref = JSON.parse(req.headers.serversettings);
connection.then((client) => {
connection.then(async (client) => {
const dbo = client.db(pref.Id).collection('SETUP');
await dbo.updateOne({ _id: 'WELCOME' }, {$set: { welcomechannel: pref.WELCOME.welcomechannel, welcomemessage: pref.WELCOME.welcomemessage }});