opt: optimize the layout for regiseter page. add function to disable registration

This commit is contained in:
RockYang
2023-08-02 17:44:13 +08:00
parent d7bbfb0fc3
commit e04856f794
6 changed files with 214 additions and 147 deletions

View File

@@ -59,7 +59,12 @@ func (h *SmsHandler) SendCode(c *gin.Context) {
resp.SUCCESS(c)
}
type statusVo struct {
EnabledMsgService bool `json:"enabled_msg_service"`
EnabledRegister bool `json:"enabled_register"`
}
// Status check if the message service is enabled
func (h *SmsHandler) Status(c *gin.Context) {
resp.SUCCESS(c, h.App.Config.EnabledMsgService)
resp.SUCCESS(c, statusVo{EnabledMsgService: h.App.Config.EnabledMsgService, EnabledRegister: h.App.SysConfig.EnabledRegister})
}