diff --git a/packages/server/src/api/controllers/row/utils/utils.ts b/packages/server/src/api/controllers/row/utils/utils.ts index ae34034221..1a8b5c1041 100644 --- a/packages/server/src/api/controllers/row/utils/utils.ts +++ b/packages/server/src/api/controllers/row/utils/utils.ts @@ -1,5 +1,5 @@ import { InternalTables } from "../../../../db/utils" -import * as userController from "../../user" + import { context } from "@budibase/backend-core" import { Ctx, @@ -24,6 +24,7 @@ import { import sdk from "../../../../sdk" import { processStringSync } from "@budibase/string-templates" import validateJs from "validate.js" +import { getFullUser } from "../../../../utilities/users" validateJs.extend(validateJs.validators.datetime, { parse: function (value: string) { @@ -68,11 +69,7 @@ export async function findRow(ctx: UserCtx, tableId: string, rowId: string) { let row: Row // TODO remove special user case in future if (tableId === InternalTables.USER_METADATA) { - ctx.params = { - id: rowId, - } - await userController.findMetadata(ctx) - row = ctx.body + row = await getFullUser(rowId) } else { row = await db.get(rowId) }