@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.
Files changed (2) hide show
  1. package/index.js +3 -3
  2. 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'); // ✅ Add this
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
- // ✅ Parameterized query (SQL injection safe)
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 = ? AND status = 'active'
44
+ WHERE id = ?
45
45
  `);
46
46
 
47
47
  const result = stmt.get(customerId);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@o-lang/bank-account-lookup",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "O-Lang resolver for secure bank balance lookups",
5
5
  "main": "index.js",
6
6
  "bin": {