PLT-5073 Improve performance of /channels/view endpoint (#4881)
* Improve performance of /channels/view endpoint * Fix store unit test
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
ffd6ccde2e
Коммит
217cdf447a
@@ -808,12 +808,12 @@ func TestChannelStoreUpdateLastViewedAt(t *testing.T) {
|
||||
m1.NotifyProps = model.GetDefaultChannelNotifyProps()
|
||||
Must(store.Channel().SaveMember(&m1))
|
||||
|
||||
err := (<-store.Channel().UpdateLastViewedAt(m1.ChannelId, m1.UserId)).Err
|
||||
err := (<-store.Channel().UpdateLastViewedAt([]string{m1.ChannelId}, m1.UserId)).Err
|
||||
if err != nil {
|
||||
t.Fatal("failed to update", err)
|
||||
}
|
||||
|
||||
err = (<-store.Channel().UpdateLastViewedAt(m1.ChannelId, "missing id")).Err
|
||||
err = (<-store.Channel().UpdateLastViewedAt([]string{m1.ChannelId}, "missing id")).Err
|
||||
if err != nil {
|
||||
t.Fatal("failed to update")
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user