Minimize app dependency on platform service (#21548)

Этот коммит содержится в:
Ibrahim Serdar Acikgoz
2022-12-07 20:31:03 +03:00
коммит произвёл GitHub
родитель 91ee9ed2eb
Коммит d8e2859b0b
17 изменённых файлов: 228 добавлений и 281 удалений

Просмотреть файл

@@ -221,7 +221,7 @@ func getUser(c *Context, w http.ResponseWriter, r *http.Request) {
} else {
c.App.SanitizeProfile(user, c.IsSystemAdmin())
}
c.App.UpdateLastActivityAtIfNeeded(*c.AppContext.Session())
c.App.Srv().Platform().UpdateLastActivityAtIfNeeded(*c.AppContext.Session())
w.Header().Set(model.HeaderEtagServer, etag)
if err := json.NewEncoder(w).Encode(user); err != nil {
c.Logger.Warn("Error while writing response", mlog.Err(err))
@@ -864,7 +864,7 @@ func getUsers(c *Context, w http.ResponseWriter, r *http.Request) {
if etag != "" {
w.Header().Set(model.HeaderEtagServer, etag)
}
c.App.UpdateLastActivityAtIfNeeded(*c.AppContext.Session())
c.App.Srv().Platform().UpdateLastActivityAtIfNeeded(*c.AppContext.Session())
js, err := json.Marshal(profiles)
if err != nil {