Skip to content

Commit

Permalink
fix: order of select on activites to match db model
Browse files Browse the repository at this point in the history
  • Loading branch information
kespinola committed Aug 4, 2022
1 parent 27bca7e commit a1b874a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/core/src/db/queries/activities.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use crate::{
};

const ACTIVITES_QUERY: &str = r"
SELECT listings.id as id, metadata, auction_house, price, created_at, marketplace_program
SELECT listings.id as id, metadata, auction_house, marketplace_program, price, created_at,
array[seller] as wallets,
array[twitter_handle_name_services.twitter_handle] as wallet_twitter_handles,
'listing' as activity_type
Expand All @@ -26,7 +26,7 @@ SELECT listings.id as id, metadata, auction_house, price, created_at, marketplac
on md.address = mc.metadata_address
WHERE auction_house = ANY($1) and ($2 is null OR mc.creator_address = ANY($2))
UNION
SELECT purchases.id as id, metadata, auction_house, price, created_at, marketplace_program,
SELECT purchases.id as id, metadata, auction_house, marketplace_program, price, created_at,
array[seller, buyer] as wallets,
array[sth.twitter_handle, bth.twitter_handle] as wallet_twitter_handles,
'purchase' as activity_type
Expand Down

0 comments on commit a1b874a

Please sign in to comment.