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 #308 #411

Merged
merged 6 commits into from Feb 11, 2020
Merged

fix #308 #411

merged 6 commits into from Feb 11, 2020

Conversation

Mte90
Copy link
Contributor

@Mte90 Mte90 commented Feb 10, 2020

This add 2 new endpoints:

  • /api/users/create?name=prova2&email=ciao@ciao7.it&password=blablabla
  • /api/users/

Require a bit of testing because I cannot find how to use the endpoints in handesk

@BadChoice BadChoice merged commit fd035ef into BadChoice:dev Feb 11, 2020
@@ -4,7 +4,9 @@
Route::resource('tickets', 'TicketsController', ['except' => 'destroy']);
Route::post('tickets/{ticket}/comments', 'CommentsController@store');
Route::post('tickets/{ticket}/assign', 'TicketAssignController@store');
Route::post('users/create', 'UsersController@store');
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually the create is not required, a simple post to users will create them

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well an endpoint to create and one to list them, I can change the endpoint name in case

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, POST users to create one, GET users list them

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GET users/{user_id} to the full info of one

$users=new User;
$users->name=$request->get('name');
$users->email=$request->get('email');
$users->password=Hash::make($request->get('password'));
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we usually use the bcrypt method bcrypt($request('password'))

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw that in the handesk code is used hash

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, ok then ;)

@Mte90
Copy link
Contributor Author

Mte90 commented Feb 11, 2020

So I don't need to add any tests for that?

@BadChoice
Copy link
Owner

A test would be great!!
do you know how to add them?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants