import express from "express" ; import { getBankTransfersByUserId } from "./database" ; import { ensureAuthenticated } from "./helpers" ; const router = express . Router ( ) ; router . get ( "/" , ensureAuthenticated , ( req , res ) => { const transfers = getBankTransfersByUserId ( req . user ?. id ! ) ; res . status ( 200 ) ; res . json ( { transfers } ) ; } ) ; export default router ;