Files
LingXi-CRM/server/api/common.go
T
2023-01-28 21:17:31 +08:00

24 lines
417 B
Go

package api
import (
"crm/response"
"crm/service"
"github.com/gin-gonic/gin"
)
type CommonApi struct {
commonService *service.CommonService
}
func NewCommonApi() *CommonApi {
return &CommonApi{
commonService: service.NewCommonService(),
}
}
// 初始化数据库
func (c *CommonApi) InitDatabase(context *gin.Context) {
errCode := c.commonService.InitDatabase()
response.Result(errCode, nil, context)
}