@koloseum/utils 0.3.7 → 0.3.8
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/dist/server.js +0 -23
- package/package.json +2 -2
package/dist/server.js
CHANGED
|
@@ -165,29 +165,6 @@ export const Instance = {
|
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
|
-
// If user has completed Player registration
|
|
169
|
-
if (roles.includes("player")) {
|
|
170
|
-
// Prepare person data
|
|
171
|
-
let personData = {};
|
|
172
|
-
if (user.app_metadata.person_data) {
|
|
173
|
-
const { first_name: firstName, last_name: lastName, pseudonym } = user.app_metadata.person_data;
|
|
174
|
-
personData = { firstName, lastName, pseudonym };
|
|
175
|
-
if (user.phone != null)
|
|
176
|
-
personData.phone = user.phone;
|
|
177
|
-
}
|
|
178
|
-
// Validate SuprSend subscriber
|
|
179
|
-
const { code, error: validationError } = await Instance.callEdgeFunction(false, supabase, `suprsend/validate-subscriber?user-id=${user.id}`, {
|
|
180
|
-
method: "POST",
|
|
181
|
-
headers: { "Content-Type": "application/json" },
|
|
182
|
-
body: personData
|
|
183
|
-
});
|
|
184
|
-
if (validationError)
|
|
185
|
-
return { error: Exception.customError(code, validationError) };
|
|
186
|
-
// Send welcome notification if not already sent
|
|
187
|
-
const { error: welcomeError } = await Instance.sendWelcomeNotification(supabase, user, microserviceGroup);
|
|
188
|
-
if (welcomeError)
|
|
189
|
-
return { error: welcomeError };
|
|
190
|
-
}
|
|
191
168
|
// Return result
|
|
192
169
|
return { isAuthorised };
|
|
193
170
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@koloseum/utils",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.8",
|
|
4
4
|
"author": "Koloseum Technologies Limited",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Utility logic for use across Koloseum web apps (TypeScript)",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"validator": "^13.15.15"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
|
-
"@koloseum/types": "^0.3.
|
|
65
|
+
"@koloseum/types": "^0.3.7",
|
|
66
66
|
"@playwright/test": "^1.55.0",
|
|
67
67
|
"@suprsend/web-components": "^0.4.0",
|
|
68
68
|
"@types/sanitize-html": "^2.16.0",
|