@budibase/worker 2.33.12 → 2.33.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Dockerfile +2 -1
- package/package.json +6 -6
- package/src/api/controllers/global/users.ts +14 -9
package/Dockerfile
CHANGED
|
@@ -24,7 +24,8 @@ COPY packages/worker/dist/yarn.lock .
|
|
|
24
24
|
|
|
25
25
|
RUN ../scripts/removeWorkspaceDependencies.sh package.json
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
ARG TARGETPLATFORM
|
|
28
|
+
RUN --mount=type=cache,target=/root/.yarn/${TARGETPLATFORM} YARN_CACHE_FOLDER=/root/.yarn/${TARGETPLATFORM} yarn install --production
|
|
28
29
|
# Remove unneeded data from file system to reduce image size
|
|
29
30
|
RUN apk del .gyp \
|
|
30
31
|
&& yarn cache clean
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@budibase/worker",
|
|
3
3
|
"email": "hi@budibase.com",
|
|
4
|
-
"version": "2.33.
|
|
4
|
+
"version": "2.33.13",
|
|
5
5
|
"description": "Budibase background service",
|
|
6
6
|
"main": "src/index.ts",
|
|
7
7
|
"repository": {
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
"author": "Budibase",
|
|
38
38
|
"license": "GPL-3.0",
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@budibase/backend-core": "2.33.
|
|
41
|
-
"@budibase/pro": "2.33.
|
|
42
|
-
"@budibase/string-templates": "2.33.
|
|
43
|
-
"@budibase/types": "2.33.
|
|
40
|
+
"@budibase/backend-core": "2.33.13",
|
|
41
|
+
"@budibase/pro": "2.33.13",
|
|
42
|
+
"@budibase/string-templates": "2.33.13",
|
|
43
|
+
"@budibase/types": "2.33.13",
|
|
44
44
|
"@koa/router": "8.0.8",
|
|
45
45
|
"@techpass/passport-openidconnect": "0.3.3",
|
|
46
46
|
"@types/global-agent": "2.1.1",
|
|
@@ -107,5 +107,5 @@
|
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
},
|
|
110
|
-
"gitHead": "
|
|
110
|
+
"gitHead": "ed7f4dc5c5d683fa08ba76c60d8304666e09bbfd"
|
|
111
111
|
}
|
|
@@ -312,16 +312,21 @@ export const tenantUserLookup = async (ctx: any) => {
|
|
|
312
312
|
* So the account holder may not be found until further pagination has occurred
|
|
313
313
|
*/
|
|
314
314
|
export const accountHolderLookup = async (ctx: Ctx) => {
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
315
|
+
try {
|
|
316
|
+
const users = await userSdk.core.getAllUsers()
|
|
317
|
+
const response = await userSdk.core.getExistingAccounts(
|
|
318
|
+
users.map(u => u.email)
|
|
319
|
+
)
|
|
320
|
+
const holder = response[0]
|
|
321
|
+
if (!holder) {
|
|
322
|
+
ctx.body = null
|
|
323
|
+
return
|
|
324
|
+
}
|
|
325
|
+
holder._id = users.find(u => u.email === holder.email)?._id
|
|
326
|
+
ctx.body = holder
|
|
327
|
+
} catch (e) {
|
|
328
|
+
ctx.body = null
|
|
322
329
|
}
|
|
323
|
-
holder._id = users.find(u => u.email === holder.email)?._id
|
|
324
|
-
ctx.body = holder
|
|
325
330
|
}
|
|
326
331
|
|
|
327
332
|
/*
|