GOWA - WhatsApp REST API with support for UI, Multi Account, Webhooks, and MCP, and Chatwoot. Built with Golang for efficient memory use.
Go botgogolanggolang-whatsappgolang-whatsapp-apirestrest-apiwhatsappwhatsapp-apiwhatsapp-api-gowhatsapp-multi-devicewhatsapp-web-multi-device
fix: remove unused code
Aldino Kemal14b0876e9c2f
diff --git a/main.go b/main.goindex db3aee4a..b5f284da 100644--- a/main.go+++ b/main.go@@ -25,7 +25,7 @@ func main() {cli := utils.InitWaCLI(db)// Service- authService := services.NewAuthService(db, cli)+ authService := services.NewAuthService(cli)sendService := services.NewSendService(cli)// Controllerdiff --git a/services/auth_service_impl.go b/services/auth_service_impl.goindex 55cb3edc..48e31a68 100644--- a/services/auth_service_impl.go+++ b/services/auth_service_impl.go@@ -10,7 +10,6 @@ import (fiberutils "github.com/gofiber/fiber/v2/utils""github.com/skip2/go-qrcode""go.mau.fi/whatsmeow"- "go.mau.fi/whatsmeow/store/sqlstore""os""path/filepath""time"@@ -18,13 +17,11 @@ import (type authServiceImpl struct {WaCli *whatsmeow.Client- WaDB *sqlstore.Container}-func NewAuthService(waDB *sqlstore.Container, waCli *whatsmeow.Client) AuthService {+func NewAuthService(waCli *whatsmeow.Client) AuthService {return &authServiceImpl{WaCli: waCli,- WaDB: waDB,}}@@ -111,13 +108,6 @@ func (service authServiceImpl) Logout(c *fiber.Ctx) (err error) {}}- err = service.WaDB.DeleteDevice(service.WaCli.Store)- if err != nil {- return errors.New("error when DeleteDevice " + err.Error())- }-err = service.WaCli.Logout()-- service.WaCli.Disconnect()return}