Perbaikan Query

This commit is contained in:
2025-11-19 08:13:34 +07:00
parent c9e9d789f0
commit 1603dcc736

View File

@@ -250,7 +250,7 @@ type Qris struct {
} }
func (h *WebSocketHandler) fetchPosDeviceByIP(ctx context.Context, db *sql.DB, ip string) ([]string, error) { func (h *WebSocketHandler) fetchPosDeviceByIP(ctx context.Context, db *sql.DB, ip string) ([]string, error) {
query := `SELECT posdevice FROM m_deviceqris WHERE ip = $1 AND status = '1'` query := `SELECT postdevice FROM m_deviceqris WHERE ip = $1 AND status = '1'`
rows, err := db.QueryContext(ctx, query, ip) rows, err := db.QueryContext(ctx, query, ip)
if err != nil { if err != nil {
return nil, err return nil, err