Update create user route

This commit is contained in:
Dayamond
2025-10-21 16:48:18 +02:00
parent c691f81ebb
commit 42a98f3435
3 changed files with 9 additions and 3 deletions
+4
View File
@@ -13,6 +13,10 @@ class UserController extends Controller
"name" => $request["name"],
"email" => $request["email"],
"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('phone')->nullable();
$table->integer('validate');
$table->integer('role');
$table->integer('role')->nullable();
$table->timestamps();
});
}
+4 -2
View File
@@ -1,11 +1,11 @@
meta {
name: Create user
type: http
seq: 2
seq: 4
}
post {
url: http://localhost:8000/api/user/create
url: http://localhost:8000/api/users/register
body: json
auth: inherit
}
@@ -17,6 +17,7 @@ headers {
body:json {
{
"name": "{{name}}",
"lastname": "{{lastname}}",
"email": "{{email}}",
"password": "{{password}}"
}
@@ -26,6 +27,7 @@ vars:pre-request {
name: name
email: test@test.com
password: test
lastname: NAME
}
assert {