From c8712eda00e314905aac6e199b13f96576b05d01 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Thu, 27 Jul 2023 18:53:58 +0100 Subject: [PATCH] Fixing some missing functions. --- packages/worker/src/api/routes/global/users.ts | 8 -------- .../src/migrations/functions/globalInfoSyncUsers.ts | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/packages/worker/src/api/routes/global/users.ts b/packages/worker/src/api/routes/global/users.ts index 348939a2e7..ce361d093e 100644 --- a/packages/worker/src/api/routes/global/users.ts +++ b/packages/worker/src/api/routes/global/users.ts @@ -122,14 +122,6 @@ router buildAdminInitValidation(), controller.adminUser ) - .post( - "/api/global/users/:userId/app/:appId/builder", - controller.addAppBuilder - ) - .delete( - "/api/global/users/:userId/app/:appId/builder", - controller.removeAppBuilder - ) .get("/api/global/users/tenant/:id", controller.tenantUserLookup) // global endpoint but needs to come at end (blocks other endpoints otherwise) .get("/api/global/users/:id", auth.builderOrAdmin, controller.find) diff --git a/packages/worker/src/migrations/functions/globalInfoSyncUsers.ts b/packages/worker/src/migrations/functions/globalInfoSyncUsers.ts index 1ffcc762c4..4bb864a000 100644 --- a/packages/worker/src/migrations/functions/globalInfoSyncUsers.ts +++ b/packages/worker/src/migrations/functions/globalInfoSyncUsers.ts @@ -10,7 +10,7 @@ import { platform } from "@budibase/backend-core" * Re-sync the global-db users to the global-info db users */ export const run = async (globalDb: any) => { - const users = (await usersSdk.allUsers()) as User[] + const users = (await usersSdk.db.allUsers()) as User[] const promises = [] for (let user of users) { promises.push(