chore: update
This commit is contained in:
@@ -23,12 +23,23 @@ type createRequest struct {
|
||||
Username string `json:"username" binding:"omitempty,min=3,max=64,alphanum"`
|
||||
|
||||
// Réglages saisis dans le popup de déploiement (voir ProvisionConfig).
|
||||
TelegramBotUsername string `json:"telegram_bot_username" binding:"omitempty,max=64"`
|
||||
TelegramBotToken string `json:"telegram_bot_token" binding:"omitempty"`
|
||||
NowPaymentsAPIKey string `json:"nowpayments_api_key" binding:"omitempty"`
|
||||
NowPaymentsIPNSecret string `json:"nowpayments_ipn_secret" binding:"omitempty"`
|
||||
StorageDriver string `json:"storage_driver" binding:"omitempty,oneof=local s3"`
|
||||
S3Bucket string `json:"s3_bucket" binding:"omitempty,max=63"`
|
||||
S3Endpoint string `json:"s3_endpoint" binding:"omitempty,max=255"`
|
||||
|
||||
LBBot1Username string `json:"lb_bot1_username" binding:"omitempty,max=64"`
|
||||
LBBot1Token string `json:"lb_bot1_token" binding:"omitempty"`
|
||||
LBBot2Username string `json:"lb_bot2_username" binding:"omitempty,max=64"`
|
||||
LBBot2Token string `json:"lb_bot2_token" binding:"omitempty"`
|
||||
|
||||
// Compte admin de l'application déployée — requis, sans lui personne ne
|
||||
// peut se connecter au backoffice de la démo.
|
||||
AdminUsername string `json:"admin_username" binding:"required,min=3,max=64,alphanum"`
|
||||
AdminPassword string `json:"admin_password" binding:"required,min=8"`
|
||||
}
|
||||
|
||||
type DetailDemoUserRequest struct {
|
||||
@@ -52,12 +63,19 @@ func (h *Handler) Create(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
cfg := ProvisionConfig{
|
||||
TelegramBotUsername: req.TelegramBotUsername,
|
||||
TelegramBotToken: req.TelegramBotToken,
|
||||
NowPaymentsAPIKey: req.NowPaymentsAPIKey,
|
||||
NowPaymentsIPNSecret: req.NowPaymentsIPNSecret,
|
||||
StorageDriver: req.StorageDriver,
|
||||
S3Bucket: req.S3Bucket,
|
||||
S3Endpoint: req.S3Endpoint,
|
||||
LBBot1Username: req.LBBot1Username,
|
||||
LBBot1Token: req.LBBot1Token,
|
||||
LBBot2Username: req.LBBot2Username,
|
||||
LBBot2Token: req.LBBot2Token,
|
||||
AdminUsername: req.AdminUsername,
|
||||
AdminPassword: req.AdminPassword,
|
||||
}
|
||||
d, err := h.svc.Create(req.LeadID, req.Username, cfg)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user