fix: async callback

This commit is contained in:
2022-04-06 11:37:54 +02:00
parent 28ea8b6b0d
commit 6650c82897
+1 -1
View File
@@ -380,7 +380,7 @@ router.post('/affiliations/:target', async function (req, res) {
queryparams[0] = target.split("@")[0];
queryparams[1] = target.split("@")[1];
var sqlquery="select value from prosody where prosody.store='config' and prosody.key='_affiliations' and prosody.user=$1 and prosody.host=$2";
dbpool.query(sqlquery, queryparams, function (derr, dres) {
dbpool.query(sqlquery, queryparams, async function (derr, dres) {
if (derr == null) {
if (dres.rowCount > 0) {
// groupchat is found and exists