21 lines
683 B
Go
21 lines
683 B
Go
package handlers
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
|
|
"sproutgate-backend/internal/storage"
|
|
)
|
|
|
|
// GetPublicRegistrationPolicy 公开:是否必须邀请码、自助注册账号规则说明(不含具体邀请码)。
|
|
func (h *Handler) GetPublicRegistrationPolicy(c *gin.Context) {
|
|
c.JSON(http.StatusOK, gin.H{
|
|
"requireInviteCode": h.store.RegistrationRequireInvite(),
|
|
"inviteRegisterRewardCoins": h.store.RegistrationInviteRegisterRewardCoins(),
|
|
"selfServiceAccountMin": storage.MinSelfServiceAccountLen,
|
|
"selfServiceAccountMax": storage.MaxSelfServiceAccountLen,
|
|
"selfServiceAccountHint": "lowercase letters and digits only",
|
|
})
|
|
}
|