mirror of
https://github.com/Bubka/2FAuth.git
synced 2024-11-26 10:15:40 +01:00
Fix twofaccounts count missing in groups listing & Active group saving
This commit is contained in:
parent
c8c1530b51
commit
1788887f85
@ -20,7 +20,7 @@ class GroupController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function index(Request $request)
|
public function index(Request $request)
|
||||||
{
|
{
|
||||||
$groups = Groups::prependTheAllGroup($request->user()->groups, $request->user()->id);
|
$groups = Groups::prependTheAllGroup($request->user()->groups()->withCount('twofaccounts')->get(), $request->user()->id);
|
||||||
|
|
||||||
return GroupResource::collection($groups);
|
return GroupResource::collection($groups);
|
||||||
}
|
}
|
||||||
|
@ -545,7 +545,7 @@
|
|||||||
|
|
||||||
// In db saving if the user set 2FAuth to memorize the active group
|
// In db saving if the user set 2FAuth to memorize the active group
|
||||||
if( this.$root.userPreferences.rememberActiveGroup ) {
|
if( this.$root.userPreferences.rememberActiveGroup ) {
|
||||||
this.form.put('/api/v1/settings/activeGroup', {returnError: true})
|
this.form.put('/api/v1/user/preferences/activeGroup', {returnError: true})
|
||||||
.then(response => {
|
.then(response => {
|
||||||
// everything's fine
|
// everything's fine
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user