[MM-33395] Invalidate email tokens (#17069)
* [MM-33395] Invalidate existing verify email tokens when creating a new one * Update store layers * Addressing review comments * Fix linter Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
b5266c37dc
Коммит
5b99df7bcd
@@ -33,6 +33,29 @@ func (_m *TokenStore) Delete(token string) error {
|
||||
return r0
|
||||
}
|
||||
|
||||
// GetAllTokensByType provides a mock function with given fields: tokenType
|
||||
func (_m *TokenStore) GetAllTokensByType(tokenType string) ([]*model.Token, error) {
|
||||
ret := _m.Called(tokenType)
|
||||
|
||||
var r0 []*model.Token
|
||||
if rf, ok := ret.Get(0).(func(string) []*model.Token); ok {
|
||||
r0 = rf(tokenType)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.Token)
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(tokenType)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetByToken provides a mock function with given fields: token
|
||||
func (_m *TokenStore) GetByToken(token string) (*model.Token, error) {
|
||||
ret := _m.Called(token)
|
||||
|
||||
Ссылка в новой задаче
Block a user