ComputeLastAccessiblePostTime returns error interface (#20598)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
e5ee5eecd8
Коммит
ad181532af
@@ -78,7 +78,7 @@ type AppIface interface {
|
||||
ClientConfigWithComputed() map[string]string
|
||||
// ComputeLastAccessiblePostTime updates cache with CreateAt time of the last accessible post as per the cloud plan's limit.
|
||||
// Use GetLastAccessiblePostTime() to access the result.
|
||||
ComputeLastAccessiblePostTime() *model.AppError
|
||||
ComputeLastAccessiblePostTime() error
|
||||
// ConvertBotToUser converts a bot to user.
|
||||
ConvertBotToUser(bot *model.Bot, userPatch *model.UserPatch, sysadmin bool) (*model.User, *model.AppError)
|
||||
// ConvertUserToBot converts a user to bot.
|
||||
|
||||
@@ -1737,7 +1737,7 @@ func (a *OpenTracingAppLayer) CompleteSwitchWithOAuth(service string, userData i
|
||||
return resultVar0, resultVar1
|
||||
}
|
||||
|
||||
func (a *OpenTracingAppLayer) ComputeLastAccessiblePostTime() *model.AppError {
|
||||
func (a *OpenTracingAppLayer) ComputeLastAccessiblePostTime() error {
|
||||
origCtx := a.ctx
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(a.ctx, "app.ComputeLastAccessiblePostTime")
|
||||
|
||||
|
||||
@@ -1418,7 +1418,7 @@ func (a *App) GetLastAccessiblePostTime() (int64, *model.AppError) {
|
||||
|
||||
// ComputeLastAccessiblePostTime updates cache with CreateAt time of the last accessible post as per the cloud plan's limit.
|
||||
// Use GetLastAccessiblePostTime() to access the result.
|
||||
func (a *App) ComputeLastAccessiblePostTime() *model.AppError {
|
||||
func (a *App) ComputeLastAccessiblePostTime() error {
|
||||
limit, appErr := a.getCloudMessagesHistoryLimit()
|
||||
if appErr != nil {
|
||||
return appErr
|
||||
|
||||
@@ -2877,7 +2877,7 @@ func TestComputeLastAccessiblePostTime(t *testing.T) {
|
||||
mockStore.On("System").Return(&mockSystemStore)
|
||||
|
||||
err := th.App.ComputeLastAccessiblePostTime()
|
||||
assert.Nil(t, err)
|
||||
assert.NoError(t, err)
|
||||
|
||||
mockSystemStore.AssertCalled(t, "SaveOrUpdate", mock.Anything)
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user