MCPcopy Create free account
hub / github.com/aiprodcoder/MIXAPI / GetSetup

Function GetSetup

controller/setup.go:26–51  ·  view source on GitHub ↗
(c *gin.Context)

Source from the content-addressed store, hash-verified

24}
25
26func 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
53func PostSetup(c *gin.Context) {
54 // Check if setup is already completed

Callers

nothing calls this directly

Calls 1

RootUserExistsFunction · 0.92

Tested by

no test coverage detected