@budibase/worker 2.27.5 → 2.27.6
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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@budibase/worker",
|
|
3
3
|
"email": "hi@budibase.com",
|
|
4
|
-
"version": "2.27.
|
|
4
|
+
"version": "2.27.6",
|
|
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.27.
|
|
41
|
-
"@budibase/pro": "2.27.
|
|
42
|
-
"@budibase/string-templates": "2.27.
|
|
43
|
-
"@budibase/types": "2.27.
|
|
40
|
+
"@budibase/backend-core": "2.27.6",
|
|
41
|
+
"@budibase/pro": "2.27.6",
|
|
42
|
+
"@budibase/string-templates": "2.27.6",
|
|
43
|
+
"@budibase/types": "2.27.6",
|
|
44
44
|
"@koa/router": "8.0.8",
|
|
45
45
|
"@techpass/passport-openidconnect": "0.3.2",
|
|
46
46
|
"@types/global-agent": "2.1.1",
|
|
@@ -109,5 +109,5 @@
|
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
},
|
|
112
|
-
"gitHead": "
|
|
112
|
+
"gitHead": "67671b9dfc8698315cb394a427266a4d184b0e26"
|
|
113
113
|
}
|
|
@@ -10,6 +10,8 @@ import {
|
|
|
10
10
|
CreateAdminUserRequest,
|
|
11
11
|
CreateAdminUserResponse,
|
|
12
12
|
Ctx,
|
|
13
|
+
DeleteInviteUserRequest,
|
|
14
|
+
DeleteInviteUsersRequest,
|
|
13
15
|
InviteUserRequest,
|
|
14
16
|
InviteUsersRequest,
|
|
15
17
|
InviteUsersResponse,
|
|
@@ -335,6 +337,20 @@ export const inviteMultiple = async (ctx: Ctx<InviteUsersRequest>) => {
|
|
|
335
337
|
ctx.body = await userSdk.invite(ctx.request.body)
|
|
336
338
|
}
|
|
337
339
|
|
|
340
|
+
export const removeMultipleInvites = async (
|
|
341
|
+
ctx: Ctx<DeleteInviteUsersRequest>
|
|
342
|
+
) => {
|
|
343
|
+
const inviteCodesToRemove = ctx.request.body.map(
|
|
344
|
+
(invite: DeleteInviteUserRequest) => invite.code
|
|
345
|
+
)
|
|
346
|
+
for (const code of inviteCodesToRemove) {
|
|
347
|
+
await cache.invite.deleteCode(code)
|
|
348
|
+
}
|
|
349
|
+
ctx.body = {
|
|
350
|
+
message: "User invites successfully removed.",
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
|
|
338
354
|
export const checkInvite = async (ctx: any) => {
|
|
339
355
|
const { code } = ctx.params
|
|
340
356
|
let invite
|
|
@@ -108,6 +108,11 @@ router
|
|
|
108
108
|
buildInviteMultipleValidation(),
|
|
109
109
|
controller.inviteMultiple
|
|
110
110
|
)
|
|
111
|
+
.post(
|
|
112
|
+
"/api/global/users/multi/invite/delete",
|
|
113
|
+
auth.builderOrAdmin,
|
|
114
|
+
controller.removeMultipleInvites
|
|
115
|
+
)
|
|
111
116
|
|
|
112
117
|
// non-global endpoints
|
|
113
118
|
.get("/api/global/users/invite/:code", controller.checkInvite)
|