1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-06-27 16:36:00 +00:00

Show Postgres version in about page

This commit is contained in:
Rogier Lommers 2021-02-16 16:37:24 +01:00 committed by GitHub
parent dde2ca06c3
commit 421bb467d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 70 additions and 45 deletions

View file

@ -79,6 +79,17 @@ func (s *Storage) CountFeeds(userID int64) int {
return result
}
// DatabaseVersion returns the version of the database which is in use
func (s *Storage) DatabaseVersion() string {
var dbVersion string
err := s.db.QueryRow(`SELECT current_setting('server_version')`).Scan(&dbVersion)
if err != nil {
return err.Error()
}
return dbVersion
}
// CountUserFeedsWithErrors returns the number of feeds with parsing errors that belong to the given user.
func (s *Storage) CountUserFeedsWithErrors(userID int64) int {
pollingParsingErrorLimit := config.Opts.PollingParsingErrorLimit()