diff --git a/server.js b/server.js index 6ea5977..66cd24a 100644 --- a/server.js +++ b/server.js @@ -486,7 +486,7 @@ function adminUsers(res) { async function createAdminUser(req, res) { const body = await readJson(req); - const companyId = ensureCompany(); + const companyId = getDefaultSite().company_id; const username = normalizeAdminUsername(body.username); const displayName = normalizeDisplayName(body.displayName) || username; const chatNick = normalizeDisplayName(body.chatNick) || displayName;