@Tags Auth @Summary Get Setting For Login @Success 200 {object} dto.LoginSetting @Router /core/auth/setting [get]
(c *gin.Context)
| 240 | // @Success 200 {object} dto.LoginSetting |
| 241 | // @Router /core/auth/setting [get] |
| 242 | func (b *BaseApi) GetLoginSetting(c *gin.Context) { |
| 243 | settingInfo, err := settingService.GetSettingInfo() |
| 244 | if err != nil { |
| 245 | helper.InternalServer(c, err) |
| 246 | return |
| 247 | } |
| 248 | ip := common.GetRealClientIP(c) |
| 249 | needCaptcha := global.IPTracker.NeedCaptcha(ip) |
| 250 | res := &dto.LoginSetting{ |
| 251 | IsDemo: global.CONF.Base.IsDemo, |
| 252 | IsIntl: global.CONF.Base.Edition == "intl", |
| 253 | IsFxplay: global.CONF.Base.IsFxplay, |
| 254 | IsOffline: global.CONF.Base.IsOffline, |
| 255 | IsEnterprise: global.CONF.Base.IsEnterprise, |
| 256 | Language: settingInfo.Language, |
| 257 | MenuTabs: settingInfo.MenuTabs, |
| 258 | PanelName: settingInfo.PanelName, |
| 259 | Theme: settingInfo.Theme, |
| 260 | NeedCaptcha: needCaptcha, |
| 261 | } |
| 262 | res.PasskeySetting = xpack.AuthProvider.PasskeyStatus(c) |
| 263 | helper.SuccessWithData(c, res) |
| 264 | } |
| 265 | |
| 266 | // @Tags Auth |
| 267 | // @Summary Begin passkey registration |
nothing calls this directly
no test coverage detected