mirror of
https://github.com/writeas/writefreely
synced 2025-02-03 14:47:32 +01:00
Remove extraneous params in Sprintf calls
This commit is contained in:
parent
771d0a8d2f
commit
2e52b8cf55
@ -35,7 +35,7 @@ func Configure() error {
|
|||||||
Success: "{{ . | bold | faint }}: ",
|
Success: "{{ . | bold | faint }}: ",
|
||||||
}
|
}
|
||||||
selTmpls := &promptui.SelectTemplates{
|
selTmpls := &promptui.SelectTemplates{
|
||||||
Selected: fmt.Sprintf(`{{.Label}} {{ . | faint }}`, promptui.IconGood),
|
Selected: fmt.Sprintf(`{{.Label}} {{ . | faint }}`),
|
||||||
}
|
}
|
||||||
|
|
||||||
prompt := promptui.Prompt{
|
prompt := promptui.Prompt{
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package writefreely
|
package writefreely
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"github.com/writeas/go-nodeinfo"
|
"github.com/writeas/go-nodeinfo"
|
||||||
"github.com/writeas/web-core/log"
|
"github.com/writeas/web-core/log"
|
||||||
"github.com/writeas/writefreely/config"
|
"github.com/writeas/writefreely/config"
|
||||||
@ -59,21 +58,21 @@ func (r nodeInfoResolver) Usage() (nodeinfo.Usage, error) {
|
|||||||
|
|
||||||
if r.cfg.App.PublicStats {
|
if r.cfg.App.PublicStats {
|
||||||
// Display bi-yearly / monthly stats
|
// Display bi-yearly / monthly stats
|
||||||
err = r.db.QueryRow(fmt.Sprintf(`SELECT COUNT(*) FROM (
|
err = r.db.QueryRow(`SELECT COUNT(*) FROM (
|
||||||
SELECT DISTINCT collection_id
|
SELECT DISTINCT collection_id
|
||||||
FROM posts
|
FROM posts
|
||||||
INNER JOIN collections c
|
INNER JOIN collections c
|
||||||
ON collection_id = c.id
|
ON collection_id = c.id
|
||||||
WHERE collection_id IS NOT NULL
|
WHERE collection_id IS NOT NULL
|
||||||
AND updated > DATE_SUB(NOW(), INTERVAL 6 MONTH)) co`, CollPublic)).Scan(&activeHalfYear)
|
AND updated > DATE_SUB(NOW(), INTERVAL 6 MONTH)) co`).Scan(&activeHalfYear)
|
||||||
|
|
||||||
err = r.db.QueryRow(fmt.Sprintf(`SELECT COUNT(*) FROM (
|
err = r.db.QueryRow(`SELECT COUNT(*) FROM (
|
||||||
SELECT DISTINCT collection_id
|
SELECT DISTINCT collection_id
|
||||||
FROM posts
|
FROM posts
|
||||||
INNER JOIN FROM collections c
|
INNER JOIN FROM collections c
|
||||||
ON collection_id = c.id
|
ON collection_id = c.id
|
||||||
WHERE collection_id IS NOT NULL
|
WHERE collection_id IS NOT NULL
|
||||||
AND updated > DATE_SUB(NOW(), INTERVAL 1 MONTH)) co`, CollPublic)).Scan(&activeMonth)
|
AND updated > DATE_SUB(NOW(), INTERVAL 1 MONTH)) co`).Scan(&activeMonth)
|
||||||
}
|
}
|
||||||
|
|
||||||
return nodeinfo.Usage{
|
return nodeinfo.Usage{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user