From 7a3fe61bf642437d4a8bac6fd3cf75bea9e53c1f Mon Sep 17 00:00:00 2001 From: Agniva De Sarker Date: Fri, 16 Jul 2021 11:05:02 +0530 Subject: [PATCH] MM-21333: Remove deprecated session method (#17910) Automatic Merge --- model/session.go | 11 ----------- model/session_test.go | 2 -- 2 files changed, 13 deletions(-) diff --git a/model/session.go b/model/session.go index c52a63183b..44f0de7d7b 100644 --- a/model/session.go +++ b/model/session.go @@ -125,17 +125,6 @@ func (s *Session) IsExpired() bool { return false } -// Deprecated: SetExpireInDays is deprecated and should not be used. -// Use (*App).SetSessionExpireInDays instead which handles the -// cases where the new ExpiresAt is not relative to CreateAt. -func (s *Session) SetExpireInDays(days int) { - if s.CreateAt == 0 { - s.ExpiresAt = GetMillis() + (1000 * 60 * 60 * 24 * int64(days)) - } else { - s.ExpiresAt = s.CreateAt + (1000 * 60 * 60 * 24 * int64(days)) - } -} - func (s *Session) AddProp(key string, value string) { if s.Props == nil { diff --git a/model/session_test.go b/model/session_test.go index 8d293720ad..e21654855d 100644 --- a/model/session_test.go +++ b/model/session_test.go @@ -57,8 +57,6 @@ func TestSessionJson(t *testing.T) { time.Sleep(10 * time.Millisecond) require.True(t, session.IsExpired(), "Should expire") - - session.SetExpireInDays(10) } func TestSessionCSRF(t *testing.T) {