MM-11384: Add system install date information to the client config (#9218)
* MM-11384: Add system install date information to the client config * Fixing translation text * Fixes from Peer Review
Этот коммит содержится в:
коммит произвёл
Carlos Tadeu Panato Junior
родитель
3b640cd51b
Коммит
6bf09e2c34
@@ -1316,3 +1316,14 @@ func (us SqlUserStore) ClearAllCustomRoleAssignments() store.StoreChannel {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
func (us SqlUserStore) InferSystemInstallDate() store.StoreChannel {
|
||||
return store.Do(func(result *store.StoreResult) {
|
||||
createAt, err := us.GetReplica().SelectInt("SELECT CreateAt FROM Users WHERE CreateAt IS NOT NULL ORDER BY CreateAt ASC LIMIT 1")
|
||||
if err != nil {
|
||||
result.Err = model.NewAppError("SqlUserStore.GetSystemInstallDate", "store.sql_user.get_system_install_date.app_error", nil, err.Error(), http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
result.Data = createAt
|
||||
})
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user