@stevenkellner/team-conduct-api 1.0.29 → 1.0.31
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.
|
@@ -14,7 +14,7 @@ class UserKickoutFunction extends firebase_function_1.FirebaseFunction {
|
|
|
14
14
|
returnTypeBuilder = new typescript_common_functionality_1.ValueTypeBuilder();
|
|
15
15
|
async execute(parameters) {
|
|
16
16
|
const userId = await (0, checkAuthentication_1.checkAuthentication)(this.userId, parameters.teamId, 'team-manager');
|
|
17
|
-
if (userId === parameters.userId)
|
|
17
|
+
if (userId.value === parameters.userId.value)
|
|
18
18
|
throw new firebase_function_1.FunctionsError('invalid-argument', 'You cannot kick yourself out of a team.');
|
|
19
19
|
const userSnapshot = await Firestore_1.Firestore.shared.user(parameters.userId).snapshot();
|
|
20
20
|
if (!userSnapshot.exists)
|
package/package.json
CHANGED
|
@@ -25,7 +25,7 @@ export class UserKickoutFunction extends FirebaseFunction<UserKickoutFunction.Pa
|
|
|
25
25
|
|
|
26
26
|
const userId = await checkAuthentication(this.userId, parameters.teamId, 'team-manager');
|
|
27
27
|
|
|
28
|
-
if (userId === parameters.userId)
|
|
28
|
+
if (userId.value === parameters.userId.value)
|
|
29
29
|
throw new FunctionsError('invalid-argument', 'You cannot kick yourself out of a team.');
|
|
30
30
|
|
|
31
31
|
const userSnapshot = await Firestore.shared.user(parameters.userId).snapshot();
|