Fix #6203
This commit is contained in:
parent
cc66a1f9c7
commit
6a732ab1cd
3 changed files with 9 additions and 5 deletions
|
|
@ -17,7 +17,9 @@ export const meta = {
|
|||
};
|
||||
|
||||
export default define(meta, async (ps, me) => {
|
||||
const noUsers = (await Users.count({})) === 0;
|
||||
const noUsers = (await Users.count({
|
||||
host: null,
|
||||
})) === 0;
|
||||
if (!noUsers && me == null) throw new Error('access denied');
|
||||
|
||||
const { account, secret } = await signup(ps.username, ps.password);
|
||||
|
|
|
|||
|
|
@ -137,7 +137,9 @@ export default define(meta, async (ps, me) => {
|
|||
category: e.category,
|
||||
url: e.url,
|
||||
})),
|
||||
requireSetup: (await Users.count({})) === 0,
|
||||
requireSetup: (await Users.count({
|
||||
host: null,
|
||||
})) === 0,
|
||||
enableEmail: instance.enableEmail,
|
||||
|
||||
enableTwitterIntegration: instance.enableTwitterIntegration,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue