Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a team membership migration bug #16

Merged
merged 3 commits into from
Sep 12, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix a team membership migration bug
The create team membership API fails if an invalid email, phone, or
name are supplied. We can get rid of all of those params because the
we can look up the user by user id and user id should always be
available.

In addition, the create team membership API will fail if an empty string
is passed for the url. We have to use the latest SDK where we can omit
the url param.
  • Loading branch information
stnguyen90 committed Sep 8, 2023
commit 110b9bf3d7337a58a222d2289b5eaef1af4b314b
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@
"require": {
"php": ">=8.0",
"utopia-php/cli": "^0.15.0",
"appwrite/appwrite": "^8.0"
"appwrite/appwrite": "^10.0.0"
abnegate marked this conversation as resolved.
Show resolved Hide resolved
},
"require-dev": {
"phpunit/phpunit": "^9.3",
6 changes: 1 addition & 5 deletions src/Migration/Destinations/Appwrite.php
Original file line number Diff line number Diff line change
@@ -575,11 +575,7 @@ public function importAuthResource(Resource $resource): Resource
$teamService->createMembership(
$resource->getTeam()->getId(),
$resource->getRoles(),
'',
$user->getEmail(),
$user->getId(),
$user->getPhone(),
$user->getName()
userId: $user->getId(),
);
break;
}