add support for project inactivity, added new checkbox component.
continuous-integration/drone/push Build is passing

This commit is contained in:
2021-01-04 19:38:46 +01:00
parent 7dfa1ec8b4
commit c3e589aa3e
11 changed files with 117 additions and 21 deletions
-4
View File
@@ -14,15 +14,11 @@ import (
func Project(g *gin.RouterGroup, db database.Database) {
l := services.Loader{DB: db}
defaultActive := true
g.GET("/", handler("projects", func(c *gin.Context) (interface{}, error) {
filter := models.ProjectFilter{}
if setting := c.Query("active"); setting != "" {
active := setting == "true"
filter.Active = &active
} else {
filter.Active = &defaultActive
}
if setting := c.Query("expiring"); setting != "" {
filter.Expiring = setting == "true"