mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-06-18 19:06:45 +02:00
Move group->loadCount from the Assign void method to the caller
This commit is contained in:
parent
de3603fcfa
commit
19f3a71c03
@ -104,6 +104,7 @@ class GroupController extends Controller
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
Groups::assign($validated['ids'], $request->user(), $group);
|
Groups::assign($validated['ids'], $request->user(), $group);
|
||||||
|
$group->loadCount('twofaccounts');
|
||||||
} catch (ModelNotFoundException $exc) {
|
} catch (ModelNotFoundException $exc) {
|
||||||
abort(404);
|
abort(404);
|
||||||
}
|
}
|
||||||
|
@ -74,8 +74,6 @@ class GroupService
|
|||||||
|
|
||||||
Log::info(sprintf('Twofaccounts #%s assigned to group %s (ID #%s)', implode(',', $ids), var_export($group->name, true), $group->id));
|
Log::info(sprintf('Twofaccounts #%s assigned to group %s (ID #%s)', implode(',', $ids), var_export($group->name, true), $group->id));
|
||||||
});
|
});
|
||||||
|
|
||||||
$group->loadCount('twofaccounts');
|
|
||||||
} else {
|
} else {
|
||||||
Log::info('Cannot find a group to assign the TwoFAccounts to');
|
Log::info('Cannot find a group to assign the TwoFAccounts to');
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user