mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-05-31 07:16:15 +02:00
Update username after Profile update
This commit is contained in:
parent
baa9658e46
commit
3dfdcb84bd
@ -132,7 +132,10 @@ class UserController extends Controller
|
|||||||
|
|
||||||
tap($user)->update($request->only('name', 'email'));
|
tap($user)->update($request->only('name', 'email'));
|
||||||
|
|
||||||
return response()->json(['message' => __('auth.forms.profile_saved')]);
|
return response()->json([
|
||||||
|
'message' => __('auth.forms.profile_saved'),
|
||||||
|
'username' => $request->name
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -92,6 +92,8 @@
|
|||||||
.then(response => {
|
.then(response => {
|
||||||
|
|
||||||
this.response = response.data.message
|
this.response = response.data.message
|
||||||
|
|
||||||
|
localStorage.setItem('user',response.data.username)
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
if( error.response.status === 400 ) {
|
if( error.response.status === 400 ) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user