mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2025-03-04 07:18:50 -07:00
parent
72319e8f1f
commit
428dac79c8
3 changed files with 3 additions and 0 deletions
|
@ -107,6 +107,7 @@ export async function signup(opts: {
|
|||
isAdmin:
|
||||
(await Users.countBy({
|
||||
host: IsNull(),
|
||||
isAdmin: true,
|
||||
})) === 0,
|
||||
}),
|
||||
);
|
||||
|
|
|
@ -35,6 +35,7 @@ export default define(meta, paramDef, async (ps, _me) => {
|
|||
const noUsers =
|
||||
(await Users.countBy({
|
||||
host: IsNull(),
|
||||
isAdmin: true,
|
||||
})) === 0;
|
||||
if (!(noUsers || me?.isAdmin)) throw new Error("access denied");
|
||||
|
||||
|
|
|
@ -489,6 +489,7 @@ export default define(meta, paramDef, async (ps, me) => {
|
|||
requireSetup:
|
||||
(await Users.countBy({
|
||||
host: IsNull(),
|
||||
isAdmin: true,
|
||||
})) === 0,
|
||||
}
|
||||
: {}),
|
||||
|
|
Loading…
Add table
Reference in a new issue