From 7d83f9d6440ea6d329cc26a266a04c3ed1a275cd Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Sun, 14 Aug 2022 19:29:07 +0300 Subject: [PATCH] Removed import path --- app/controllers/api/users.php | 12 ++++++------ tests/e2e/Services/Users/UsersBase.php | 14 +++++++------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/app/controllers/api/users.php b/app/controllers/api/users.php index 5f3ae047c4..48624d82d7 100644 --- a/app/controllers/api/users.php +++ b/app/controllers/api/users.php @@ -127,7 +127,7 @@ App::post('/v1/users/bcrypt') $response->dynamic($user, Response::MODEL_USER); }); -App::post('/v1/users/import/md5') +App::post('/v1/users/md5') ->desc('Create User with MD5 Password') ->groups(['api', 'users']) ->label('event', 'users.[userId].create') @@ -154,7 +154,7 @@ App::post('/v1/users/import/md5') $response->dynamic($user, Response::MODEL_USER); }); -App::post('/v1/users/import/argon2') +App::post('/v1/users/argon2') ->desc('Create User with Argon2 Password') ->groups(['api', 'users']) ->label('event', 'users.[userId].create') @@ -181,7 +181,7 @@ App::post('/v1/users/import/argon2') $response->dynamic($user, Response::MODEL_USER); }); -App::post('/v1/users/import/sha') +App::post('/v1/users/sha') ->desc('Create User with SHA Password') ->groups(['api', 'users']) ->label('event', 'users.[userId].create') @@ -215,7 +215,7 @@ App::post('/v1/users/import/sha') $response->dynamic($user, Response::MODEL_USER); }); -App::post('/v1/users/import/phpass') +App::post('/v1/users/phpass') ->desc('Create User with PHPass Password') ->groups(['api', 'users']) ->label('event', 'users.[userId].create') @@ -242,7 +242,7 @@ App::post('/v1/users/import/phpass') $response->dynamic($user, Response::MODEL_USER); }); -App::post('/v1/users/import/scrypt') +App::post('/v1/users/scrypt') ->desc('Create User with Scrypt Password') ->groups(['api', 'users']) ->label('event', 'users.[userId].create') @@ -282,7 +282,7 @@ App::post('/v1/users/import/scrypt') $response->dynamic($user, Response::MODEL_USER); }); -App::post('/v1/users/import/scrypt-modified') +App::post('/v1/users/scrypt-modified') ->desc('Create User with Scrypt Modified Password') ->groups(['api', 'users']) ->label('event', 'users.[userId].create') diff --git a/tests/e2e/Services/Users/UsersBase.php b/tests/e2e/Services/Users/UsersBase.php index ef5a22c280..6a2ae90e75 100644 --- a/tests/e2e/Services/Users/UsersBase.php +++ b/tests/e2e/Services/Users/UsersBase.php @@ -58,7 +58,7 @@ trait UsersBase /** * Test Create with hashed passwords */ - $res = $this->client->call(Client::METHOD_POST, '/users/import/md5', array_merge([ + $res = $this->client->call(Client::METHOD_POST, '/users/md5', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -68,7 +68,7 @@ trait UsersBase 'name' => 'MD5 User', ]); - $res = $this->client->call(Client::METHOD_POST, '/users/import/bcrypt', array_merge([ + $res = $this->client->call(Client::METHOD_POST, '/users/bcrypt', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -82,7 +82,7 @@ trait UsersBase $this->assertEquals($res['body']['password'], '$2a$15$xX/myGbFU.ZSKHSi6EHdBOySTdYm8QxBLXmOPHrYMwV0mHRBBSBOq'); $this->assertEquals($res['body']['hash'], 'bcrypt'); - $res = $this->client->call(Client::METHOD_POST, '/users/import/argon2', array_merge([ + $res = $this->client->call(Client::METHOD_POST, '/users/argon2', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -96,7 +96,7 @@ trait UsersBase $this->assertEquals($res['body']['password'], '$argon2i$v=19$m=20,t=3,p=2$YXBwd3JpdGU$A/54i238ed09ZR4NwlACU5XnkjNBZU9QeOEuhjLiexI'); $this->assertEquals($res['body']['hash'], 'argon2'); - $res = $this->client->call(Client::METHOD_POST, '/users/import/sha', array_merge([ + $res = $this->client->call(Client::METHOD_POST, '/users/sha', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -112,7 +112,7 @@ trait UsersBase $this->assertEquals($res['body']['hash'], 'sha'); $this->assertEquals($res['body']['hashOptions']['version'], 'sha512'); - $res = $this->client->call(Client::METHOD_POST, '/users/import/scrypt', array_merge([ + $res = $this->client->call(Client::METHOD_POST, '/users/scrypt', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -136,7 +136,7 @@ trait UsersBase $this->assertEquals($res['body']['hashOptions']['costParallel'], 2); $this->assertEquals($res['body']['hashOptions']['length'], 64); - $res = $this->client->call(Client::METHOD_POST, '/users/import/phpass', array_merge([ + $res = $this->client->call(Client::METHOD_POST, '/users/phpass', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -149,7 +149,7 @@ trait UsersBase $this->assertEquals($res['headers']['status-code'], 201); $this->assertEquals($res['body']['password'], '$P$Br387rwferoKN7uwHZqNMu98q3U8RO.'); - $res = $this->client->call(Client::METHOD_POST, '/users/import/scrypt-modified', array_merge([ + $res = $this->client->call(Client::METHOD_POST, '/users/scrypt-modified', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [