Update create user route
This commit is contained in:
@@ -13,6 +13,10 @@ class UserController extends Controller
|
|||||||
"name" => $request["name"],
|
"name" => $request["name"],
|
||||||
"email" => $request["email"],
|
"email" => $request["email"],
|
||||||
"password" => Hash::make($request["password"]),
|
"password" => Hash::make($request["password"]),
|
||||||
|
"lastname" => $request["lastname"],
|
||||||
|
"validate" => 0,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
return response()->json(['message' => 'User created successfully']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ return new class extends Migration
|
|||||||
$table->string('password');
|
$table->string('password');
|
||||||
$table->string('phone')->nullable();
|
$table->string('phone')->nullable();
|
||||||
$table->integer('validate');
|
$table->integer('validate');
|
||||||
$table->integer('role');
|
$table->integer('role')->nullable();
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
meta {
|
meta {
|
||||||
name: Create user
|
name: Create user
|
||||||
type: http
|
type: http
|
||||||
seq: 2
|
seq: 4
|
||||||
}
|
}
|
||||||
|
|
||||||
post {
|
post {
|
||||||
url: http://localhost:8000/api/user/create
|
url: http://localhost:8000/api/users/register
|
||||||
body: json
|
body: json
|
||||||
auth: inherit
|
auth: inherit
|
||||||
}
|
}
|
||||||
@@ -17,6 +17,7 @@ headers {
|
|||||||
body:json {
|
body:json {
|
||||||
{
|
{
|
||||||
"name": "{{name}}",
|
"name": "{{name}}",
|
||||||
|
"lastname": "{{lastname}}",
|
||||||
"email": "{{email}}",
|
"email": "{{email}}",
|
||||||
"password": "{{password}}"
|
"password": "{{password}}"
|
||||||
}
|
}
|
||||||
@@ -26,6 +27,7 @@ vars:pre-request {
|
|||||||
name: name
|
name: name
|
||||||
email: test@test.com
|
email: test@test.com
|
||||||
password: test
|
password: test
|
||||||
|
lastname: NAME
|
||||||
}
|
}
|
||||||
|
|
||||||
assert {
|
assert {
|
||||||
|
|||||||
Reference in New Issue
Block a user