Skip to content

Commit

Permalink
fix: moved user service to correct scope (#346)
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-clegg authored Jun 25, 2024
1 parent 20cae97 commit 6545d9e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions directus/extensions/directus-extension-events/src/events/info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ export async function getInfo(req: any, res: any, services: any, database: any)
let user;
let juniors = [];

if (userId) {
const userService = new UsersService({
knex: database,
schema: req.schema,
accountability: AdminAccountability
});
const userService = new UsersService({
knex: database,
schema: req.schema,
accountability: AdminAccountability
});

if (userId) {
user = await userService.readOne(userId, {
fields: ["*", "role.name"]
});
Expand Down

0 comments on commit 6545d9e

Please sign in to comment.