Skip to content

Commit

Permalink
because of some API adjustments
Browse files Browse the repository at this point in the history
Better handling of session based
  • Loading branch information
mlantz committed Jan 24, 2024
1 parent 049aa32 commit c106f1a
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .phpunit.cache/test-results
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version":1,"defects":{"Tests\\Feature\\Controllers\\Ajax\\ApiTokenControllerTest::testCreate":5,"Tests\\Feature\\Controllers\\Ajax\\ApiTokenControllerTest::testIndex":5,"Tests\\Feature\\Controllers\\Ajax\\ApiTokenControllerTest::testDestroy":5,"Tests\\Feature\\Controllers\\Ajax\\FileUploadControllerTest::testFileUpload":8,"Tests\\Feature\\Controllers\\Ajax\\SubscriptionControllerTest::testCreateSubsciption":1,"Tests\\Feature\\Controllers\\Ajax\\SubscriptionControllerTest::testUpdatePaymentMethod":1,"Tests\\Feature\\Controllers\\User\\BillingControllerTest::testBillingSubscribe":1,"Tests\\Feature\\Controllers\\User\\BillingControllerTest::testBillingGetDetails":1,"Tests\\Feature\\Controllers\\User\\BillingControllerTest::testBillingPaymentMethod":1,"Tests\\Feature\\Controllers\\User\\BillingControllerTest::testBillingCoupon":1,"Tests\\Feature\\Controllers\\User\\UserTwoFactorTest::testTwoFactorEmail":8,"Tests\\Feature\\Controllers\\User\\UserTwoFactorTest::testGoogleTwoFactor":5,"Tests\\Feature\\Controllers\\Auth\\TwoFactorControllerTest::testGetTwoFactorPage":5,"Tests\\Feature\\Controllers\\Auth\\TwoFactorControllerTest::testVerifyTwoFactorEmail":7,"Tests\\Feature\\Controllers\\User\\ApiTokenControllerTest::testCreate":7,"Tests\\Feature\\Controllers\\User\\ApiTokenControllerTest::testIndex":5,"Tests\\Feature\\Controllers\\User\\ApiTokenControllerTest::testDestroy":5,"Tests\\Feature\\Controllers\\User\\UserTwoFactorTest::testAuthenticatorTwoFactor":7,"Tests\\Feature\\Controllers\\Auth\\RegistrationControllerTest::testPostRegistration":7,"Tests\\Feature\\Controllers\\Auth\\RecoveryControllerTest::testVerifyRecovery":7,"Tests\\Feature\\Controllers\\Ajax\\FileUploadControllerTest::testImageUpload":7,"Tests\\Feature\\Controllers\\TeamMembersControllerTest::testLeaveTeam":5,"Tests\\Feature\\Controllers\\TeamMembersControllerTest::testRemoveTeamMember":5,"Tests\\Feature\\Controllers\\TeamsControllerTest::testDelete":5,"Tests\\Feature\\Controllers\\User\\InvitesControllerTest::testAccept":7,"Tests\\Feature\\Controllers\\User\\ChangePasswordControllerTest::testSecurity":8,"Tests\\Feature\\Controllers\\User\\ChangePasswordControllerTest::testUpdatePassword":7},"times":{"Tests\\Unit\\ActivityServiceTest::testLog":0.004,"Tests\\Unit\\InviteServiceTest::testCreate":0.014,"Tests\\Unit\\InviteServiceTest::testValidateInvitation":0.002,"Tests\\Unit\\TeamServiceTest::testCreate":0.001,"Tests\\Unit\\TeamServiceTest::testUpdate":0.002,"Tests\\Unit\\TeamServiceTest::testInvite":0.002,"Tests\\Unit\\TeamServiceTest::testLeaveTeam":0.003,"Tests\\Unit\\TeamServiceTest::testRemoveMember":0.004,"Tests\\Unit\\TeamServiceTest::testDeleteTeam":0.004,"Tests\\Feature\\Controllers\\Admin\\DashboardControllerTest::testIndex":0.072,"Tests\\Feature\\Controllers\\Admin\\RoleControllerTest::testIndex":0.035,"Tests\\Feature\\Controllers\\Admin\\RoleControllerTest::testCreate":0.034,"Tests\\Feature\\Controllers\\Admin\\RoleControllerTest::testStore":0.013,"Tests\\Feature\\Controllers\\Admin\\RoleControllerTest::testEdit":0.038,"Tests\\Feature\\Controllers\\Admin\\RoleControllerTest::testUpdate":0.005,"Tests\\Feature\\Controllers\\Admin\\RoleControllerTest::testDelete":0.005,"Tests\\Feature\\Controllers\\Admin\\UserControllerTest::testIndex":0.036,"Tests\\Feature\\Controllers\\Admin\\UserControllerTest::testSearch":0.035,"Tests\\Feature\\Controllers\\Admin\\UserControllerTest::testGetInvite":0.032,"Tests\\Feature\\Controllers\\Admin\\UserControllerTest::testPostInvite":0.09,"Tests\\Feature\\Controllers\\Admin\\UserControllerTest::testEdit":0.036,"Tests\\Feature\\Controllers\\Admin\\UserControllerTest::testUpdate":0.006,"Tests\\Feature\\Controllers\\Admin\\UserControllerTest::testLoginAsUser":0.006,"Tests\\Feature\\Controllers\\Admin\\UserControllerTest::testReturnToLoginFromUser":0.008,"Tests\\Feature\\Controllers\\Admin\\UserControllerTest::testDelete":0.004,"Tests\\Feature\\Controllers\\Ajax\\ApiTokenControllerTest::testCreate":0.008,"Tests\\Feature\\Controllers\\Ajax\\ApiTokenControllerTest::testIndex":0.001,"Tests\\Feature\\Controllers\\Ajax\\ApiTokenControllerTest::testDestroy":0.001,"Tests\\Feature\\Controllers\\Ajax\\CookiePolicyControllerTest::testAccept":0.004,"Tests\\Feature\\Controllers\\Ajax\\FileUploadControllerTest::testFileUpload":0.014,"Tests\\Feature\\Controllers\\Ajax\\SubscriptionControllerTest::testCreateSubsciption":0.003,"Tests\\Feature\\Controllers\\Ajax\\SubscriptionControllerTest::testUpdatePaymentMethod":0.001,"Tests\\Feature\\Controllers\\Api\\UsersControllerTest::testMe":0.026,"Tests\\Feature\\Controllers\\Api\\UsersControllerTest::testMeWithBearerToken":0.012,"Tests\\Feature\\Controllers\\Api\\UsersControllerTest::testUpdate":0.007,"Tests\\Feature\\Controllers\\Api\\UsersControllerTest::testDestroy":0.003,"Tests\\Feature\\Controllers\\Auth\\ConfirmsPasswordControllerTest::testGetConfirmPasswordPage":0.029,"Tests\\Feature\\Controllers\\Auth\\ForgotPasswordControllerTest::testGetForgotPassword":0.014,"Tests\\Feature\\Controllers\\Auth\\LoginControllerTest::testGetLoginPage":0.018,"Tests\\Feature\\Controllers\\Auth\\RegistrationControllerTest::testGetRegistration":0.016,"Tests\\Feature\\Controllers\\Auth\\ResetPasswordControllerTest::testGetResetPasswordPage":0.013,"Tests\\Feature\\Controllers\\Auth\\VerificationControllerTest::testGetVerificationPage":0.003,"Tests\\Feature\\Controllers\\DashboardControllerTest::testDashboard":0.036,"Tests\\Feature\\Controllers\\InvitesControllerTest::testResend":0.007,"Tests\\Feature\\Controllers\\InvitesControllerTest::testRevoke":0.005,"Tests\\Feature\\Controllers\\PagesControllerTest::testHome":0.016,"Tests\\Feature\\Controllers\\PagesControllerTest::testSupport":0.028,"Tests\\Feature\\Controllers\\PagesControllerTest::testPrivacyPolicy":0.027,"Tests\\Feature\\Controllers\\PagesControllerTest::testTermsOfService":0.025,"Tests\\Feature\\Controllers\\TeamMembersControllerTest::testShow":0.038,"Tests\\Feature\\Controllers\\TeamMembersControllerTest::testEditMember":0.035,"Tests\\Feature\\Controllers\\TeamMembersControllerTest::testUpdateMember":0.009,"Tests\\Feature\\Controllers\\TeamMembersControllerTest::testInviteMember":0.007,"Tests\\Feature\\Controllers\\TeamMembersControllerTest::testLeaveTeam":0.006,"Tests\\Feature\\Controllers\\TeamMembersControllerTest::testRemoveTeamMember":0.006,"Tests\\Feature\\Controllers\\TeamsControllerTest::testIndex":0.03,"Tests\\Feature\\Controllers\\TeamsControllerTest::testIndexWithSubcription":0.03,"Tests\\Feature\\Controllers\\TeamsControllerTest::testCreate":0.031,"Tests\\Feature\\Controllers\\TeamsControllerTest::testStore":0.006,"Tests\\Feature\\Controllers\\TeamsControllerTest::testEdit":0.04,"Tests\\Feature\\Controllers\\TeamsControllerTest::testUpdate":0.007,"Tests\\Feature\\Controllers\\TeamsControllerTest::testDelete":0.008,"Tests\\Feature\\Controllers\\User\\BillingControllerTest::testBillingSubscribe":0.002,"Tests\\Feature\\Controllers\\User\\BillingControllerTest::testBillingGetDetails":0.001,"Tests\\Feature\\Controllers\\User\\BillingControllerTest::testBillingPaymentMethod":0.001,"Tests\\Feature\\Controllers\\User\\BillingControllerTest::testBillingCoupon":0.001,"Tests\\Feature\\Controllers\\User\\ChangePasswordControllerTest::testSecurity":0.036,"Tests\\Feature\\Controllers\\User\\ChangePasswordControllerTest::testUpdatePassword":0.097,"Tests\\Feature\\Controllers\\User\\DestroyControllerTest::testDestroy":0.028,"Tests\\Feature\\Controllers\\User\\InvitesControllerTest::testIndex":0.028,"Tests\\Feature\\Controllers\\User\\InvitesControllerTest::testAccept":0.006,"Tests\\Feature\\Controllers\\User\\InvitesControllerTest::testReject":0.028,"Tests\\Feature\\Controllers\\User\\LogoutSessionsControllerTest::testSessionLogout":0.007,"Tests\\Feature\\Controllers\\User\\NotificationControllerTest::testIndex":0.029,"Tests\\Feature\\Controllers\\User\\NotificationControllerTest::testMarkAsRead":0.005,"Tests\\Feature\\Controllers\\User\\NotificationControllerTest::testDelete":0.004,"Tests\\Feature\\Controllers\\User\\NotificationControllerTest::testDeleteAll":0.005,"Tests\\Feature\\Controllers\\User\\SettingsControllerTest::testSettings":0.033,"Tests\\Feature\\Controllers\\User\\SettingsControllerTest::testUpdateSettings":0.005,"Tests\\Feature\\Controllers\\User\\SettingsControllerTest::testUpdateUserAvatar":0.006,"Tests\\Feature\\Controllers\\User\\UserTwoFactorTest::testTwoFactorEmail":0.005,"Tests\\Feature\\Controllers\\User\\UserTwoFactorTest::testGoogleTwoFactor":0,"Tests\\Feature\\Helpers\\ActivityHelperTest::testActivityLog":0.001,"Tests\\Feature\\Helpers\\NotificationHelperTest::testAppNotify":0,"Tests\\Feature\\Helpers\\NotificationHelperTest::testEmailNotifyDisabled":0.001,"Tests\\Feature\\Helpers\\NotificationHelperTest::testPusherGeneral":0.002,"Tests\\Feature\\Helpers\\NotificationHelperTest::testPusherUser":0.001,"Tests\\Feature\\Resources\\UserResourceTest::testUserResource":0,"Tests\\Feature\\Controllers\\Auth\\TwoFactorControllerTest::testGetTwoFactorPage":0.021,"Tests\\Feature\\Controllers\\Auth\\TwoFactorControllerTest::testVerifyTwoFactorEmail":0.005,"Tests\\Feature\\Controllers\\Auth\\RecoveryControllerTest::testGetRecoveryPage":0.017,"Tests\\Feature\\Controllers\\User\\ApiTokenControllerTest::testCreate":0.005,"Tests\\Feature\\Controllers\\User\\ApiTokenControllerTest::testIndex":0.04,"Tests\\Feature\\Controllers\\User\\ApiTokenControllerTest::testDestroy":0.008,"Tests\\Feature\\Controllers\\User\\UserTwoFactorTest::testAuthenticatorTwoFactor":0.005,"Tests\\Feature\\Controllers\\Auth\\RegistrationControllerTest::testPostRegistration":0.01,"Tests\\Feature\\Controllers\\Auth\\RecoveryControllerTest::testVerifyRecovery":0.015,"Tests\\Feature\\Controllers\\Ajax\\FileUploadControllerTest::testImageUpload":0.004}}
{"version":1,"defects":{"Tests\\Feature\\Controllers\\Ajax\\ApiTokenControllerTest::testCreate":5,"Tests\\Feature\\Controllers\\Ajax\\ApiTokenControllerTest::testIndex":5,"Tests\\Feature\\Controllers\\Ajax\\ApiTokenControllerTest::testDestroy":5,"Tests\\Feature\\Controllers\\Ajax\\FileUploadControllerTest::testFileUpload":8,"Tests\\Feature\\Controllers\\Ajax\\SubscriptionControllerTest::testCreateSubsciption":1,"Tests\\Feature\\Controllers\\Ajax\\SubscriptionControllerTest::testUpdatePaymentMethod":1,"Tests\\Feature\\Controllers\\User\\BillingControllerTest::testBillingSubscribe":1,"Tests\\Feature\\Controllers\\User\\BillingControllerTest::testBillingGetDetails":1,"Tests\\Feature\\Controllers\\User\\BillingControllerTest::testBillingPaymentMethod":1,"Tests\\Feature\\Controllers\\User\\BillingControllerTest::testBillingCoupon":1,"Tests\\Feature\\Controllers\\User\\UserTwoFactorTest::testTwoFactorEmail":8,"Tests\\Feature\\Controllers\\User\\UserTwoFactorTest::testGoogleTwoFactor":5,"Tests\\Feature\\Controllers\\Auth\\TwoFactorControllerTest::testGetTwoFactorPage":5,"Tests\\Feature\\Controllers\\Auth\\TwoFactorControllerTest::testVerifyTwoFactorEmail":7,"Tests\\Feature\\Controllers\\User\\ApiTokenControllerTest::testCreate":7,"Tests\\Feature\\Controllers\\User\\ApiTokenControllerTest::testIndex":5,"Tests\\Feature\\Controllers\\User\\ApiTokenControllerTest::testDestroy":5,"Tests\\Feature\\Controllers\\User\\UserTwoFactorTest::testAuthenticatorTwoFactor":7,"Tests\\Feature\\Controllers\\Auth\\RegistrationControllerTest::testPostRegistration":7,"Tests\\Feature\\Controllers\\Auth\\RecoveryControllerTest::testVerifyRecovery":7,"Tests\\Feature\\Controllers\\Ajax\\FileUploadControllerTest::testImageUpload":7,"Tests\\Feature\\Controllers\\TeamMembersControllerTest::testLeaveTeam":5,"Tests\\Feature\\Controllers\\TeamMembersControllerTest::testRemoveTeamMember":5,"Tests\\Feature\\Controllers\\TeamsControllerTest::testDelete":5,"Tests\\Feature\\Controllers\\User\\InvitesControllerTest::testAccept":7,"Tests\\Feature\\Controllers\\User\\ChangePasswordControllerTest::testSecurity":8,"Tests\\Feature\\Controllers\\User\\ChangePasswordControllerTest::testUpdatePassword":7},"times":{"Tests\\Unit\\ActivityServiceTest::testLog":0.007,"Tests\\Unit\\InviteServiceTest::testCreate":0.014,"Tests\\Unit\\InviteServiceTest::testValidateInvitation":0.002,"Tests\\Unit\\TeamServiceTest::testCreate":0.001,"Tests\\Unit\\TeamServiceTest::testUpdate":0.001,"Tests\\Unit\\TeamServiceTest::testInvite":0.004,"Tests\\Unit\\TeamServiceTest::testLeaveTeam":0.004,"Tests\\Unit\\TeamServiceTest::testRemoveMember":0.004,"Tests\\Unit\\TeamServiceTest::testDeleteTeam":0.005,"Tests\\Feature\\Controllers\\Admin\\DashboardControllerTest::testIndex":0.071,"Tests\\Feature\\Controllers\\Admin\\RoleControllerTest::testIndex":0.034,"Tests\\Feature\\Controllers\\Admin\\RoleControllerTest::testCreate":0.036,"Tests\\Feature\\Controllers\\Admin\\RoleControllerTest::testStore":0.009,"Tests\\Feature\\Controllers\\Admin\\RoleControllerTest::testEdit":0.035,"Tests\\Feature\\Controllers\\Admin\\RoleControllerTest::testUpdate":0.005,"Tests\\Feature\\Controllers\\Admin\\RoleControllerTest::testDelete":0.005,"Tests\\Feature\\Controllers\\Admin\\UserControllerTest::testIndex":0.048,"Tests\\Feature\\Controllers\\Admin\\UserControllerTest::testSearch":0.035,"Tests\\Feature\\Controllers\\Admin\\UserControllerTest::testGetInvite":0.031,"Tests\\Feature\\Controllers\\Admin\\UserControllerTest::testPostInvite":0.097,"Tests\\Feature\\Controllers\\Admin\\UserControllerTest::testEdit":0.035,"Tests\\Feature\\Controllers\\Admin\\UserControllerTest::testUpdate":0.006,"Tests\\Feature\\Controllers\\Admin\\UserControllerTest::testLoginAsUser":0.007,"Tests\\Feature\\Controllers\\Admin\\UserControllerTest::testReturnToLoginFromUser":0.009,"Tests\\Feature\\Controllers\\Admin\\UserControllerTest::testDelete":0.005,"Tests\\Feature\\Controllers\\Ajax\\ApiTokenControllerTest::testCreate":0.008,"Tests\\Feature\\Controllers\\Ajax\\ApiTokenControllerTest::testIndex":0.001,"Tests\\Feature\\Controllers\\Ajax\\ApiTokenControllerTest::testDestroy":0.001,"Tests\\Feature\\Controllers\\Ajax\\CookiePolicyControllerTest::testAccept":0.003,"Tests\\Feature\\Controllers\\Ajax\\FileUploadControllerTest::testFileUpload":0.016,"Tests\\Feature\\Controllers\\Ajax\\SubscriptionControllerTest::testCreateSubsciption":0.003,"Tests\\Feature\\Controllers\\Ajax\\SubscriptionControllerTest::testUpdatePaymentMethod":0.001,"Tests\\Feature\\Controllers\\Api\\UsersControllerTest::testMe":0.025,"Tests\\Feature\\Controllers\\Api\\UsersControllerTest::testMeWithBearerToken":0.009,"Tests\\Feature\\Controllers\\Api\\UsersControllerTest::testUpdate":0.007,"Tests\\Feature\\Controllers\\Api\\UsersControllerTest::testDestroy":0.004,"Tests\\Feature\\Controllers\\Auth\\ConfirmsPasswordControllerTest::testGetConfirmPasswordPage":0.03,"Tests\\Feature\\Controllers\\Auth\\ForgotPasswordControllerTest::testGetForgotPassword":0.015,"Tests\\Feature\\Controllers\\Auth\\LoginControllerTest::testGetLoginPage":0.018,"Tests\\Feature\\Controllers\\Auth\\RegistrationControllerTest::testGetRegistration":0.016,"Tests\\Feature\\Controllers\\Auth\\ResetPasswordControllerTest::testGetResetPasswordPage":0.013,"Tests\\Feature\\Controllers\\Auth\\VerificationControllerTest::testGetVerificationPage":0.003,"Tests\\Feature\\Controllers\\DashboardControllerTest::testDashboard":0.036,"Tests\\Feature\\Controllers\\InvitesControllerTest::testResend":0.007,"Tests\\Feature\\Controllers\\InvitesControllerTest::testRevoke":0.004,"Tests\\Feature\\Controllers\\PagesControllerTest::testHome":0.016,"Tests\\Feature\\Controllers\\PagesControllerTest::testSupport":0.028,"Tests\\Feature\\Controllers\\PagesControllerTest::testPrivacyPolicy":0.025,"Tests\\Feature\\Controllers\\PagesControllerTest::testTermsOfService":0.025,"Tests\\Feature\\Controllers\\TeamMembersControllerTest::testShow":0.035,"Tests\\Feature\\Controllers\\TeamMembersControllerTest::testEditMember":0.034,"Tests\\Feature\\Controllers\\TeamMembersControllerTest::testUpdateMember":0.009,"Tests\\Feature\\Controllers\\TeamMembersControllerTest::testInviteMember":0.006,"Tests\\Feature\\Controllers\\TeamMembersControllerTest::testLeaveTeam":0.005,"Tests\\Feature\\Controllers\\TeamMembersControllerTest::testRemoveTeamMember":0.006,"Tests\\Feature\\Controllers\\TeamsControllerTest::testIndex":0.027,"Tests\\Feature\\Controllers\\TeamsControllerTest::testIndexWithSubcription":0.028,"Tests\\Feature\\Controllers\\TeamsControllerTest::testCreate":0.03,"Tests\\Feature\\Controllers\\TeamsControllerTest::testStore":0.006,"Tests\\Feature\\Controllers\\TeamsControllerTest::testEdit":0.034,"Tests\\Feature\\Controllers\\TeamsControllerTest::testUpdate":0.006,"Tests\\Feature\\Controllers\\TeamsControllerTest::testDelete":0.007,"Tests\\Feature\\Controllers\\User\\BillingControllerTest::testBillingSubscribe":0.003,"Tests\\Feature\\Controllers\\User\\BillingControllerTest::testBillingGetDetails":0.001,"Tests\\Feature\\Controllers\\User\\BillingControllerTest::testBillingPaymentMethod":0.001,"Tests\\Feature\\Controllers\\User\\BillingControllerTest::testBillingCoupon":0.001,"Tests\\Feature\\Controllers\\User\\ChangePasswordControllerTest::testSecurity":0.036,"Tests\\Feature\\Controllers\\User\\ChangePasswordControllerTest::testUpdatePassword":0.186,"Tests\\Feature\\Controllers\\User\\DestroyControllerTest::testDestroy":0.027,"Tests\\Feature\\Controllers\\User\\InvitesControllerTest::testIndex":0.028,"Tests\\Feature\\Controllers\\User\\InvitesControllerTest::testAccept":0.006,"Tests\\Feature\\Controllers\\User\\InvitesControllerTest::testReject":0.027,"Tests\\Feature\\Controllers\\User\\LogoutSessionsControllerTest::testSessionLogout":0.006,"Tests\\Feature\\Controllers\\User\\NotificationControllerTest::testIndex":0.029,"Tests\\Feature\\Controllers\\User\\NotificationControllerTest::testMarkAsRead":0.006,"Tests\\Feature\\Controllers\\User\\NotificationControllerTest::testDelete":0.004,"Tests\\Feature\\Controllers\\User\\NotificationControllerTest::testDeleteAll":0.005,"Tests\\Feature\\Controllers\\User\\SettingsControllerTest::testSettings":0.034,"Tests\\Feature\\Controllers\\User\\SettingsControllerTest::testUpdateSettings":0.006,"Tests\\Feature\\Controllers\\User\\SettingsControllerTest::testUpdateUserAvatar":0.006,"Tests\\Feature\\Controllers\\User\\UserTwoFactorTest::testTwoFactorEmail":0.006,"Tests\\Feature\\Controllers\\User\\UserTwoFactorTest::testGoogleTwoFactor":0,"Tests\\Feature\\Helpers\\ActivityHelperTest::testActivityLog":0.001,"Tests\\Feature\\Helpers\\NotificationHelperTest::testAppNotify":0,"Tests\\Feature\\Helpers\\NotificationHelperTest::testEmailNotifyDisabled":0.002,"Tests\\Feature\\Helpers\\NotificationHelperTest::testPusherGeneral":0.003,"Tests\\Feature\\Helpers\\NotificationHelperTest::testPusherUser":0.001,"Tests\\Feature\\Resources\\UserResourceTest::testUserResource":0,"Tests\\Feature\\Controllers\\Auth\\TwoFactorControllerTest::testGetTwoFactorPage":0.021,"Tests\\Feature\\Controllers\\Auth\\TwoFactorControllerTest::testVerifyTwoFactorEmail":0.005,"Tests\\Feature\\Controllers\\Auth\\RecoveryControllerTest::testGetRecoveryPage":0.017,"Tests\\Feature\\Controllers\\User\\ApiTokenControllerTest::testCreate":0.005,"Tests\\Feature\\Controllers\\User\\ApiTokenControllerTest::testIndex":0.041,"Tests\\Feature\\Controllers\\User\\ApiTokenControllerTest::testDestroy":0.009,"Tests\\Feature\\Controllers\\User\\UserTwoFactorTest::testAuthenticatorTwoFactor":0.005,"Tests\\Feature\\Controllers\\Auth\\RegistrationControllerTest::testPostRegistration":0.01,"Tests\\Feature\\Controllers\\Auth\\RecoveryControllerTest::testVerifyRecovery":0.016,"Tests\\Feature\\Controllers\\Ajax\\FileUploadControllerTest::testImageUpload":0.004}}
10 changes: 5 additions & 5 deletions app/Http/Controllers/Api/ApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@

class ApiController extends Controller
{
public $user;

public function __construct()
public function user()
{
$this->user = auth('sanctum')->user();
$user = auth('sanctum')->user();

if (is_null($this->user) && ! app()->runningInConsole()) {
if (is_null($user) && ! app()->runningInConsole()) {
abort(401, 'Unauthorized.');
}

return $user;
}
}
Loading

0 comments on commit c106f1a

Please sign in to comment.