(c *gin.Context)
| 24 | } |
| 25 | |
| 26 | func GetSetup(c *gin.Context) { |
| 27 | setup := Setup{ |
| 28 | Status: constant.Setup, |
| 29 | } |
| 30 | if constant.Setup { |
| 31 | c.JSON(200, gin.H{ |
| 32 | "success": true, |
| 33 | "data": setup, |
| 34 | }) |
| 35 | return |
| 36 | } |
| 37 | setup.RootInit = model.RootUserExists() |
| 38 | if common.UsingMySQL { |
| 39 | setup.DatabaseType = "mysql" |
| 40 | } |
| 41 | if common.UsingPostgreSQL { |
| 42 | setup.DatabaseType = "postgres" |
| 43 | } |
| 44 | if common.UsingSQLite { |
| 45 | setup.DatabaseType = "sqlite" |
| 46 | } |
| 47 | c.JSON(200, gin.H{ |
| 48 | "success": true, |
| 49 | "data": setup, |
| 50 | }) |
| 51 | } |
| 52 | |
| 53 | func PostSetup(c *gin.Context) { |
| 54 | // Check if setup is already completed |
nothing calls this directly
no test coverage detected