Skip to content

Commit

Permalink
remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
mastercactapus committed Jun 21, 2023
1 parent 207a908 commit b67febb
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions devtools/mockslack/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,30 +30,3 @@ func (st *state) newUser(u User) User {

return u
}

func (st *state) addUserAppScope(userID, clientID string, scopes ...string) string {
st.mx.Lock()
defer st.mx.Unlock()

if st.users[userID].appTokens[clientID] == nil {
tok := &AuthToken{ID: st.gen.UserAccessToken(), User: userID, Scopes: scopes}
st.tokens[tok.ID] = tok
st.users[userID].appTokens[clientID] = tok

code := st.gen.TokenCode()
st.tokenCodes[code] = &tokenCode{AuthToken: tok, ClientID: clientID}
return code
}

tok := st.users[userID].appTokens[clientID]

for _, scope := range scopes {
if !contains(tok.Scopes, scope) {
tok.Scopes = append(tok.Scopes, scope)
}
}

code := st.gen.TokenCode()
st.tokenCodes[code] = &tokenCode{AuthToken: tok, ClientID: clientID}
return code
}

0 comments on commit b67febb

Please sign in to comment.