66 "github.com/1Panel-dev/1Panel/core/app/dto"
77 "github.com/1Panel-dev/1Panel/core/app/model"
88 "github.com/1Panel-dev/1Panel/core/constant"
9- "github.com/1Panel-dev/1Panel/core/global"
109 "github.com/1Panel-dev/1Panel/core/utils/captcha"
1110 "github.com/gin-gonic/gin"
1211)
@@ -119,24 +118,16 @@ func (b *BaseApi) GetResponsePage(c *gin.Context) {
119118}
120119
121120// @Tags Auth
122- // @Summary Check System isDemo
123- // @Success 200 {boolean} demo
124- // @Router /core/auth/demo [get]
125- func (b * BaseApi ) CheckIsDemo (c * gin.Context ) {
126- helper .SuccessWithData (c , global .CONF .Base .IsDemo )
127- }
128-
129- // @Tags Auth
130- // @Summary Load System Language
131- // @Success 200 {string} language
132- // @Router /core/auth/language [get]
133- func (b * BaseApi ) GetLanguage (c * gin.Context ) {
121+ // @Summary Get Setting For Login
122+ // @Success 200 {object} dto.SystemSetting
123+ // @Router /core/auth/setting [get]
124+ func (b * BaseApi ) GetLoginSetting (c * gin.Context ) {
134125 settingInfo , err := settingService .GetSettingInfo ()
135126 if err != nil {
136127 helper .InternalServer (c , err )
137128 return
138129 }
139- helper .SuccessWithData (c , settingInfo . Language )
130+ helper .SuccessWithData (c , settingInfo )
140131}
141132
142133func saveLoginLogs (c * gin.Context , err error ) {
@@ -151,11 +142,3 @@ func saveLoginLogs(c *gin.Context, err error) {
151142 logs .Agent = c .GetHeader ("User-Agent" )
152143 _ = logService .CreateLoginLog (logs )
153144}
154-
155- // @Tags Auth
156- // @Summary Check System IsIntl
157- // @Success 200 {string} intl
158- // @Router /auth/intl [get]
159- func (b * BaseApi ) CheckIsIntl (c * gin.Context ) {
160- helper .SuccessWithData (c , global .CONF .Base .IsIntl )
161- }
0 commit comments