| const pool = require('../config/db'); | |
| const PaymentMethod = { | |
| create: async (crypto_name, wallet_address) => { | |
| await pool.query('INSERT INTO payment_methods (crypto_name, wallet_address) VALUES (?, ?)', [crypto_name, wallet_address]); | |
| }, | |
| findAll: async () => { | |
| const [rows] = await pool.query('SELECT * FROM payment_methods'); | |
| return rows; | |
| } | |
| }; | |
| module.exports = PaymentMethod; |