start huge dashboard rework; improve dark theme
This commit is contained in:
parent
14feb47640
commit
f324c249f6
21 changed files with 365 additions and 235 deletions
|
|
@ -99,6 +99,17 @@ func GetAllReleases(db *sqlx.DB, onlyVisible bool, limit int, full bool) ([]*mod
|
|||
|
||||
return releases, nil
|
||||
}
|
||||
func GetReleasesCount(db *sqlx.DB, onlyVisible bool) (int, error) {
|
||||
query := "SELECT count(*) FROM musicrelease"
|
||||
if onlyVisible {
|
||||
query += " WHERE visible=true"
|
||||
}
|
||||
|
||||
var count int
|
||||
err := db.Get(&count, query)
|
||||
|
||||
return count, err
|
||||
}
|
||||
|
||||
func CreateRelease(db *sqlx.DB, release *model.Release) error {
|
||||
_, err := db.Exec(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue