Conversion of User to event system (#9741)

* Conversion of User to event system

* fix

* warning

* fixes

* Skip lastActiveAt in changeset

* fix: Skip count in view changeset

* refactor: Remove userDestroyer

* refactor: Remove userSuspender

* refactor: Remove userUnsuspender

* tests
This commit is contained in:
Tom Moor
2025-07-27 13:15:21 -04:00
committed by GitHub
parent 27d0fe86d1
commit cc591ebc66
46 changed files with 472 additions and 816 deletions
+1 -6
View File
@@ -29,7 +29,6 @@ router.post(
validate(T.CreateTestUsersSchema),
async (ctx: APIContext<T.CreateTestUsersReq>) => {
const { count = 10 } = ctx.input.body;
const { user } = ctx.state.auth;
const invites = Array(Math.min(count, 100))
.fill(0)
.map(() => {
@@ -45,11 +44,7 @@ router.post(
Logger.info("utils", `Creating ${count} test users`, invites);
// Generate a bunch of invites
const response = await userInviter({
user,
invites,
ip: ctx.request.ip,
});
const response = await userInviter(ctx, { invites });
// Convert from invites to active users by marking as active
await Promise.all(