From 75b3418fc40c44e514e8bc13ebc093e63c4e453a Mon Sep 17 00:00:00 2001 From: Punarv Pawade Date: Tue, 27 Feb 2024 00:24:57 +0530 Subject: [PATCH] [TEMP]: remove deployment limit --- api/v1/deployer/deployer.go | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/api/v1/deployer/deployer.go b/api/v1/deployer/deployer.go index d61458d..b5cda9e 100644 --- a/api/v1/deployer/deployer.go +++ b/api/v1/deployer/deployer.go @@ -31,21 +31,21 @@ func Deploy(c *gin.Context) { walletAddress := c.GetString(paseto.CTX_WALLET_ADDRES) fmt.Println(walletAddress) - var count int64 - err := db.Model(&models.Sotreus{}).Where("wallet_address = ?", walletAddress).Find(&models.Sotreus{}).Count(&count).Error - if err != nil { - logwrapper.Errorf("failed to fetch data from database: %s", err) - httpo.NewErrorResponse(http.StatusInternalServerError, err.Error()).SendD(c) - return - } - if count >= 1 { - logwrapper.Error("Can't create more vpn instances, maximum 1 allowed") - httpo.NewErrorResponse(http.StatusBadRequest, "Can't create more vpn instances, maximum 1 allowed").SendD(c) - return - } + // var count int64 + // err := db.Model(&models.Sotreus{}).Where("wallet_address = ?", walletAddress).Find(&models.Sotreus{}).Count(&count).Error + // if err != nil { + // logwrapper.Errorf("failed to fetch data from database: %s", err) + // httpo.NewErrorResponse(http.StatusInternalServerError, err.Error()).SendD(c) + // return + // } + // if count >= 1 { + // logwrapper.Error("Can't create more vpn instances, maximum 1 allowed") + // httpo.NewErrorResponse(http.StatusBadRequest, "Can't create more vpn instances, maximum 1 allowed").SendD(c) + // return + // } var req DeployRequest - err = c.BindJSON(&req) + err := c.BindJSON(&req) if err != nil { logwrapper.Errorf("failed to bind JSON: %s", err) httpo.NewErrorResponse(http.StatusInternalServerError, err.Error()).SendD(c)