Minimize app dependency on platform service (#21548)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
91ee9ed2eb
Коммит
d8e2859b0b
@@ -1491,7 +1491,7 @@ func viewChannel(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
c.App.UpdateLastActivityAtIfNeeded(*c.AppContext.Session())
|
||||
c.App.Srv().Platform().UpdateLastActivityAtIfNeeded(*c.AppContext.Session())
|
||||
c.ExtendSessionExpiryIfNeeded(w, r)
|
||||
|
||||
// Returning {"status": "OK", ...} for backwards compatibility
|
||||
|
||||
@@ -103,7 +103,7 @@ func createPost(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
c.App.SetStatusOnline(c.AppContext.Session().UserId, false)
|
||||
}
|
||||
|
||||
c.App.UpdateLastActivityAtIfNeeded(*c.AppContext.Session())
|
||||
c.App.Srv().Platform().UpdateLastActivityAtIfNeeded(*c.AppContext.Session())
|
||||
c.ExtendSessionExpiryIfNeeded(w, r)
|
||||
|
||||
w.WriteHeader(http.StatusCreated)
|
||||
|
||||
@@ -56,7 +56,7 @@ func getGraphQLUser(ctx context.Context, id string) (*user, error) {
|
||||
}
|
||||
}
|
||||
|
||||
c.App.UpdateLastActivityAtIfNeeded(*c.AppContext.Session())
|
||||
c.App.Srv().Platform().UpdateLastActivityAtIfNeeded(*c.AppContext.Session())
|
||||
|
||||
return &user{*usr}, nil
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Ссылка в новой задаче
Block a user