user service: add oauth and profile images (#17784)
* users: add cache to service * reflect review comments * add oauth * move profile picture genaration * reflect review comments * move default bot image to users package * add missing wraps and apply suggestions * add comment for app.GetSession
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
79d4e9e9a9
Коммит
f69b28610a
@@ -153,15 +153,18 @@ func TestHubSessionRevokeRace(t *testing.T) {
|
||||
mockStatusStore.On("UpdateLastActivityAt", "user1", mock.Anything).Return(nil)
|
||||
mockStatusStore.On("SaveOrUpdate", mock.AnythingOfType("*model.Status")).Return(nil)
|
||||
|
||||
mockOAuthStore := mocks.OAuthStore{}
|
||||
mockStore.On("Session").Return(&mockSessionStore)
|
||||
mockStore.On("OAuth").Return(&mockOAuthStore)
|
||||
mockStore.On("Status").Return(&mockStatusStore)
|
||||
mockStore.On("User").Return(&mockUserStore)
|
||||
mockStore.On("Post").Return(&mockPostStore)
|
||||
mockStore.On("System").Return(&mockSystemStore)
|
||||
|
||||
userService, err := users.New(users.ServiceInitializer{
|
||||
userService, err := users.New(users.ServiceConfig{
|
||||
UserStore: &mockUserStore,
|
||||
SessionStore: &mockSessionStore,
|
||||
OAuthStore: &mockOAuthStore,
|
||||
ConfigFn: th.App.srv.Config,
|
||||
Metrics: th.App.Metrics(),
|
||||
Cluster: th.App.Cluster(),
|
||||
|
||||
Ссылка в новой задаче
Block a user