Skip to content
Snippets Groups Projects
Commit f5a06b42 authored by Jonah Husson's avatar Jonah Husson
Browse files

return error if register doesn't have token

parent fc04b598
Branches
Tags
No related merge requests found
......@@ -196,6 +196,9 @@ func (nb *Impl) RegisterForNotifications(clientToken []byte, auth *connect.Auth)
if !auth.IsAuthenticated {
return errors.New("Cannot register for notifications: client is not authenticated")
}
if string(clientToken) == "" {
return errors.New("Cannot register for notifications with empty client token")
}
// Implement this
u := &storage.User{
Id: auth.Sender.GetId(),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment