MCPcopy Create free account
hub / github.com/QuantumNous/new-api / GetSetup

Function GetSetup

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

Source from the content-addressed store, hash-verified

25}
26
27func GetSetup(c *gin.Context) {
28 setup := Setup{
29 Status: constant.Setup,
30 }
31 if constant.Setup {
32 c.JSON(200, gin.H{
33 "success": true,
34 "data": setup,
35 })
36 return
37 }
38 setup.RootInit = model.RootUserExists()
39 setup.DatabaseType = string(common.MainDatabaseType())
40 c.JSON(200, gin.H{
41 "success": true,
42 "data": setup,
43 })
44}
45
46func PostSetup(c *gin.Context) {
47 // Check if setup is already completed

Callers

nothing calls this directly

Calls 2

RootUserExistsFunction · 0.92
MainDatabaseTypeFunction · 0.92

Tested by

no test coverage detected