From a6b0170b1d36b1dbf70229f45e5e9287eb57d276 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Sun, 25 Aug 2024 17:16:22 +0800 Subject: [PATCH] :bug: Fix query issue --- .idea/workspace.xml | 57 ++++++++++++++--------------- pkg/internal/server/api/bots_api.go | 2 +- 2 files changed, 29 insertions(+), 30 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index e566224..138fdeb 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -4,9 +4,8 @@ - @@ -179,7 +177,8 @@ - true diff --git a/pkg/internal/server/api/bots_api.go b/pkg/internal/server/api/bots_api.go index 1628316..f159e78 100644 --- a/pkg/internal/server/api/bots_api.go +++ b/pkg/internal/server/api/bots_api.go @@ -18,7 +18,7 @@ func listBots(c *fiber.Ctx) error { } user := c.Locals("user").(models.Account) - tx := database.C.Where("automated_id = ?", user.AutomatedID) + tx := database.C.Where("automated_id = ?", user.ID) countTx := tx var count int64