mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-22 08:53:48 +01:00
parent
72319e8f1f
commit
428dac79c8
@ -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…
Reference in New Issue
Block a user