站内消息即时通知,测试断线重连

This commit is contained in:
undefined committed 2020-07-14 11:11:20 +08:00
1 parent a93da2badb
commit 900e19382b
14 files changed
+120 -46

No files matched your search

+2 -1
View File
@@ -6,7 +6,8 @@ import pwhash from '../lib/hash.hydro';
export const description = 'Install';
export async function run({ username = '', password = '' } = {}) {
await domain.add('system', 0, 'Hydro', 'Hydro System');
const ddoc = await domain.get('system');
if (!ddoc) await domain.add('system', 0, 'Hydro', 'Hydro System');
if (username && password) {
const udoc = await user.getById('system', -1);
if (!udoc) {