diff --git a/src/socket.io/admin/settings.js b/src/socket.io/admin/settings.js index d34f7ca81b..89208af698 100644 --- a/src/socket.io/admin/settings.js +++ b/src/socket.io/admin/settings.js @@ -19,6 +19,6 @@ Settings.set = async function (socket, data) { await events.log(eventData); }; -Settings.clearSitemapCache = function () { +Settings.clearSitemapCache = async function () { require('../../sitemap').clearCache(); }; diff --git a/test/socket.io.js b/test/socket.io.js index dd41c8e40d..a2ef7c7d69 100644 --- a/test/socket.io.js +++ b/test/socket.io.js @@ -564,9 +564,8 @@ describe('socket.io', () => { }); }); - it('should clear sitemap cache', (done) => { - socketAdmin.settings.clearSitemapCache({ uid: adminUid }, {}); - done(); + it('should clear sitemap cache', async () => { + await socketAdmin.settings.clearSitemapCache({ uid: adminUid }, {}); }); it('should send test email', async () => {