Skip to content

Conversation

@Catchabox
Copy link

This PR fixes a panic: runtime error: invalid memory address or nil pointer dereference that occurs in subscribeLogic.go. Reason: When getUserSubscribe is called with an invalid or expired token, UserModel.FindOneSubscribeByToken returns a nil userSub without an error. Accessing userSub.SubscribeId in the subsequent code causes a panic (HTTP 500). Fix: Added a nil check for userSub before returning it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants