Skip to content

Commit

Permalink
Remove leading slash from UM functions
Browse files Browse the repository at this point in the history
  • Loading branch information
sheldonvaughn committed Jul 10, 2024
1 parent 069944a commit 8dc1948
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
22 changes: 11 additions & 11 deletions lib/UserManagement.php
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ public function sendInvitation(
$inviterUserId = null,
$roleSlug = null
) {
$path = "/user_management/invitations";
$path = "user_management/invitations";

$params = [
"email" => $email,
Expand Down Expand Up @@ -421,7 +421,7 @@ public function sendInvitation(
*/
public function getInvitation($invitationId)
{
$path = "/user_management/invitations/{$invitationId}";
$path = "user_management/invitations/{$invitationId}";

$response = Client::request(
Client::METHOD_GET,
Expand All @@ -445,7 +445,7 @@ public function getInvitation($invitationId)
*/
public function findInvitationByToken($invitationToken)
{
$path = "/user_management/invitations/by_token/{$invitationToken}";
$path = "user_management/invitations/by_token/{$invitationToken}";

$response = Client::request(
Client::METHOD_GET,
Expand Down Expand Up @@ -483,7 +483,7 @@ public function listInvitations(
$after = null,
$order = null
) {
$path = "/user_management/invitations";
$path = "user_management/invitations";

$params = [
"email" => $email,
Expand Down Expand Up @@ -524,7 +524,7 @@ public function listInvitations(
*/
public function revokeInvitation($invitationId)
{
$path = "/user_management/invitations/{$invitationId}/revoke";
$path = "user_management/invitations/{$invitationId}/revoke";

$response = Client::request(
Client::METHOD_POST,
Expand Down Expand Up @@ -923,7 +923,7 @@ public function listAuthFactors($userId)
*/
public function getEmailVerification($emailVerificationId)
{
$path = "/user_management/email_verification/{$emailVerificationId}";
$path = "user_management/email_verification/{$emailVerificationId}";

$response = Client::request(
Client::METHOD_GET,
Expand Down Expand Up @@ -988,7 +988,7 @@ public function verifyEmail($userId, $code)
*/
public function getPasswordReset($passwordResetId)
{
$path = "/user_management/password_reset/{$passwordResetId}";
$path = "user_management/password_reset/{$passwordResetId}";

$response = Client::request(
Client::METHOD_GET,
Expand All @@ -1013,7 +1013,7 @@ public function getPasswordReset($passwordResetId)
public function createPasswordReset(
$email,
) {
$path = "/user_management/password_reset";
$path = "user_management/password_reset";

$params = [
"email" => $email
Expand Down Expand Up @@ -1093,7 +1093,7 @@ public function resetPassword($token, $newPassword)
*/
public function getMagicAuth($magicAuthId)
{
$path = "/user_management/magic_auth/{$magicAuthId}";
$path = "user_management/magic_auth/{$magicAuthId}";

$response = Client::request(
Client::METHOD_GET,
Expand All @@ -1120,7 +1120,7 @@ public function createMagicAuth(
$email,
$invitationToken = null,
) {
$path = "/user_management/magic_auth";
$path = "user_management/magic_auth";

$params = [
"email" => $email,
Expand Down Expand Up @@ -1149,7 +1149,7 @@ public function createMagicAuth(
*/
public function sendMagicAuthCode($email)
{
$path = "/user_management/magic_auth/send";
$path = "user_management/magic_auth/send";

$params = [
"email" => $email,
Expand Down
22 changes: 11 additions & 11 deletions tests/WorkOS/UserManagementTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ public function testCreateUser()
public function testGetEmailVerification()
{
$emailVerificationId = "email_verification_01E4ZCR3C56J083X43JQXF3JK5";
$path = "/user_management/email_verification/{$emailVerificationId}";
$path = "user_management/email_verification/{$emailVerificationId}";

$result = $this->emailVerificationResponseFixture();

Expand Down Expand Up @@ -567,7 +567,7 @@ public function testVerifyEmail()
public function testGetPasswordReset()
{
$passwordResetId = "password_reset_01E4ZCR3C56J083X43JQXF3JK5";
$path = "/user_management/password_reset/{$passwordResetId}";
$path = "user_management/password_reset/{$passwordResetId}";

$result = $this->passwordResetResponseFixture();

Expand All @@ -589,7 +589,7 @@ public function testGetPasswordReset()

public function testCreatePasswordReset()
{
$path = "/user_management/password_reset";
$path = "user_management/password_reset";

$result = $this->passwordResetResponseFixture();

Expand Down Expand Up @@ -723,7 +723,7 @@ public function testListUsers()
public function testGetMagicAuth()
{
$magicAuthId = "magic_auth_01E4ZCR3C56J083X43JQXF3JK5";
$path = "/user_management/magic_auth/{$magicAuthId}";
$path = "user_management/magic_auth/{$magicAuthId}";

$result = $this->magicAuthResponseFixture();

Expand All @@ -745,7 +745,7 @@ public function testGetMagicAuth()

public function testCreateMagicAuth()
{
$path = "/user_management/magic_auth";
$path = "user_management/magic_auth";

$result = $this->magicAuthResponseFixture();

Expand Down Expand Up @@ -774,7 +774,7 @@ public function testCreateMagicAuth()

private function testSendMagicAuthCode()
{
$path = "/user_management/magic_auth/send";
$path = "user_management/magic_auth/send";

$params = [
"email" => "test@test.com"
Expand Down Expand Up @@ -1045,7 +1045,7 @@ public function testReactivateOrganizationMembership()

public function testSendInvitation()
{
$path = "/user_management/invitations";
$path = "user_management/invitations";

$result = $this->invitationResponseFixture();

Expand Down Expand Up @@ -1082,7 +1082,7 @@ public function testSendInvitation()
public function testGetInvitation()
{
$invitationId = "invitation_01E4ZCR3C56J083X43JQXF3JK5";
$path = "/user_management/invitations/{$invitationId}";
$path = "user_management/invitations/{$invitationId}";

$result = $this->invitationResponseFixture();

Expand All @@ -1105,7 +1105,7 @@ public function testGetInvitation()
public function testFindInvitationByToken()
{
$invitationToken = "Z1uX3RbwcIl5fIGJJJCXXisdI";
$path = "/user_management/invitations/by_token/{$invitationToken}";
$path = "user_management/invitations/by_token/{$invitationToken}";

$result = $this->invitationResponseFixture();

Expand All @@ -1127,7 +1127,7 @@ public function testFindInvitationByToken()

public function testListInvitations()
{
$path = "/user_management/invitations";
$path = "user_management/invitations";

$result = $this->invitationListResponseFixture();

Expand Down Expand Up @@ -1158,7 +1158,7 @@ public function testListInvitations()
public function testRevokeInvitation()
{
$invitationId = "invitation_01E4ZCR3C56J083X43JQXF3JK5";
$path = "/user_management/invitations/{$invitationId}/revoke";
$path = "user_management/invitations/{$invitationId}/revoke";

$result = $this->invitationResponseFixture();

Expand Down

0 comments on commit 8dc1948

Please sign in to comment.