From 33770ce1296fb9d0ff1bcace7760021d96d8764f Mon Sep 17 00:00:00 2001 From: James Houlahan Date: Wed, 29 Apr 2020 15:24:23 +0200 Subject: [PATCH] fix: crash in fakeapi if user is nil --- test/fakeapi/fakeapi.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/fakeapi/fakeapi.go b/test/fakeapi/fakeapi.go index 7005d14b..f37a2646 100644 --- a/test/fakeapi/fakeapi.go +++ b/test/fakeapi/fakeapi.go @@ -108,7 +108,7 @@ func (api *FakePMAPI) checkInternetAndRecordCall(method method, path string, req } func (api *FakePMAPI) sendAuth(auth *pmapi.Auth) { - api.controller.clientManager.HandleAuth(pmapi.ClientAuth{UserID: api.user.ID, Auth: auth}) + api.controller.clientManager.HandleAuth(pmapi.ClientAuth{UserID: api.userID, Auth: auth}) } func (api *FakePMAPI) setUser(username string) error {