File size: 398 Bytes
116549b |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
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; |