@o-lang/bank-account-lookup 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +3 -3
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// This resolver ONLY reads data - no mutations allowed
|
|
3
3
|
|
|
4
4
|
const Database = require('better-sqlite3');
|
|
5
|
-
const path = require('path');
|
|
5
|
+
const path = require('path');
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Bank account balance lookup resolver
|
|
@@ -37,11 +37,11 @@ module.exports = async (action, context) => {
|
|
|
37
37
|
// ✅ Open database in READ-ONLY mode (security critical)
|
|
38
38
|
const db = new Database(dbPath, { readonly: true });
|
|
39
39
|
|
|
40
|
-
// ✅
|
|
40
|
+
// ✅ FIXED: Remove status condition (table doesn't have status column)
|
|
41
41
|
const stmt = db.prepare(`
|
|
42
42
|
SELECT balance
|
|
43
43
|
FROM customer_balances
|
|
44
|
-
WHERE id = ?
|
|
44
|
+
WHERE id = ?
|
|
45
45
|
`);
|
|
46
46
|
|
|
47
47
|
const result = stmt.get(customerId);
|