File tree Expand file tree Collapse file tree
app/donors/[id]/recurring Expand file tree Collapse file tree Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -25,22 +25,17 @@ export async function GET(req: Request) {
2525 return Response . json ( {
2626 status : 200 ,
2727 content : donations . map ( ( d ) => ( {
28- ID : d . id ,
29- status : d . cancelled ? "STOPPED" : "ACTIVE" ,
30- donorID : 0 ,
31- full_name : null ,
32- KID : d . id ,
33- timestamp_created : d . created_at . toISOString ( ) ,
34- monthly_charge_day : d . monthly_charge_day ,
35- force_charge_date : null ,
36- paused_until_date : null ,
28+ id : d . id ,
29+ kid : d . gateway_metadata ?. bank_msg ?? d . id ,
30+ cancelled : d . cancelled ,
31+ createdAt : d . created_at . toISOString ( ) ,
32+ chargeDay : d . monthly_charge_day ,
3733 amount : d . amount ,
38- agreement_url_code : null ,
3934 method : d . method ,
4035 } ) ) ,
4136 } ) ;
4237 } catch ( e ) {
43- logError ( "donors/[id]/recurring/vipps : " , e ) ;
38+ logError ( "donors/[id]/recurring: " , e ) ;
4439 return Response . json ( { message : "Something went wrong" } , { status : 500 } ) ;
4540 } finally {
4641 dbRelease ( db ) ;
Original file line number Diff line number Diff line change @@ -642,7 +642,7 @@ export async function getRecurringDonationsByEmail(
642642 `
643643 select
644644 d.*,
645- coalesce( extract(day from c.created_at)::int, 0) as monthly_charge_day
645+ extract(day from c.created_at)::int as monthly_charge_day
646646 from donation d
647647 join donor p on p.id = d.donor_id
648648 left join lateral (
You can’t perform that action at this time.
0 commit comments