Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- lib/app.ts:75:// TODO(cgag): need to start figuring out migrations by hand.
- lib/app.ts:76:// TODO(cgag): we have to keep all these firebase ids around because
- lib/dbTypes.ts:44:// TODO(cgag): why can this be empty string? that seems wrong
- lib/helpers/db-queries/affiliate-referrals.ts:6:// TODO(cgag): probably shouldn't only conditional return data, choose always or never
- lib/helpers/db-queries/affiliate-referrals.ts:7:// TODO(cgag): also shouldn't be modifying state of arguments
- lib/helpers/db-queries/affiliate-referrals.ts:100:// TODO(cgag): don't modify arguments
- lib/helpers/email/purchase-notification.ts:7:// TODO(cgag): emails are inconsistent in paramaeter order, make address
- lib/helpers/email/receipt.ts:5:// TODO(cgag): probably get rid of this, just a transitory
- lib/helpers/support/getUserCoinbaseOrders.ts:59:// TODO(cgag): too many functions don't have return types
- lib/helpers/support/refundDomains.ts:52: // TODO(cgag): what's going on here, won't this put a bunch of undefined's in here?J
- lib/middleware/__mocks__/authOnly.ts:7: // TODO(cgag): ^ but it probably shouldn't be
- lib/middleware/authOnly.ts:8: // TODO(cgag): ^ but it probably shouldn't be
- lib/model/order.ts:12:// TODO(cgag): do we need this purchase stuff at all or can we get it from domain owners?
- lib/model/order.ts:24:// TODO(cgag): this doesn't always actually set something in the db? is that right?
- lib/model/order.ts:46:// TODO(cgag): wait what, someetimes it returns a string and sometimes a promise?
- lib/model/order.ts:281: // TODO(cgag): woah, what are the semantics here? is this destructive
- lib/model/payment.ts:24:// TODO(cgag): goofy type, consider rewriting
- lib/model/user.ts:12:// TODO(cgag): need a type here
- lib/routes/mobile/domains/get.ts:41: // TODO(cgag): don't make types that are just arrays of other types
- lib/routes/payment/stripe/post-pg.test.ts:5:// TODO(cgag): delete? testing mocking
- lib/routes/payment/stripe/post-pg.test.ts:33:// TODO(cgag): some of this depends on having cloned unstoppable-dev to unstoppable-test
- lib/routes/payment/stripe/post-pg.test.ts:138: // TODO(cgag): is this sending out real emails to the business team?
- lib/routes/payment/stripe/post-pg.test.ts:146: // TODO(cgag): this has to match waht we put in the cart in beforeAll
- lib/routes/payment/stripe/post-pg.ts:39:// TODO(cgag): needs to be called with auth only
- lib/routes/payment/stripe/post-pg.ts:50:// TODO(cgag): should return error messages for each way it can go wrong.
- lib/routes/payment/stripe/post-pg.ts:77: // TODO(cgag): what the fuck is tokenId
- lib/routes/payment/stripe/post-pg.ts:81: // TODO(cgag): uh oh, createCharge uses tokenId, I don't really understand
- lib/routes/payment/stripe/post-pg.ts:92: // TODO(cgag): had to type this as any for my stupid test. What about with mocking?
- lib/routes/payment/stripe/post-pg.ts:119: // TODO(cgag): real error handling
- lib/routes/payment/stripe/post-pg.ts:125: // TODO(cgag): test with someone who actually has cart items
- lib/routes/payment/stripe/post-pg.ts:126: // TODO(cgag): should this just pass in items instead of user?
- lib/routes/payment/stripe/post-pg.ts:130: // TODO(cgag): use constructor?
- lib/routes/payment/stripe/post-pg.ts:151: // TODO(cgag): should we set/append user.orders or will it do it for us via cascae?
- lib/routes/payment/stripe/post-pg.ts:170: // TODO(cgag): error handling
- lib/routes/payment/stripe/post-pg.ts:186: // TODO(cgag): probably don't want tests hitting stripe or tracking apis...
- lib/routes/payment/stripe/post-pg.ts:201: // TODO(cgag): transaction (or rely on cascades, which have an implicit transaction)
- lib/routes/payment/stripe/post-pg.ts:208: // TODO(cgag): wait! never use referral code? always use affiliateInfo.code?
- lib/routes/payment/stripe/post-pg.ts:248: // an if guard. Don't know why. Don't have internet. TODO(cgag): find out later.
- lib/routes/payment/stripe/post-pg.ts:258: // TODO(cgag): does it matter if we use user.firebaseid vs user.id?
- lib/routes/payment/stripe/post-pg.ts:263: // TODO(cgag): email should never be null, it's nullable to to old fucked up data, fix that data,
- lib/routes/payment/stripe/post-pg.ts:290: // TODO(cgag): do this, donald changed it a bunch, no longer no what it should look like,
- lib/routes/payment/stripe/post-pg.ts:312:// TODO(cgag): never use function keyword since rest of the codebase doesn't
- lib/routes/payment/stripe/post-pg.ts:313:// TODO(cgag): how do we ensure the user we're passed was loaded
- lib/routes/payment/stripe/post-pg.ts:316:// TODO(cgag): have ryan confirm this logic is good
- lib/routes/payment/stripe/post-pg.ts:334:// TODO(cgag): break up this function?
- lib/routes/payment/stripe/post-pg.ts:335:// TODO(cgag): pass in a User
- lib/routes/payment/stripe/post-pg.ts:349: // TODO(cgag): how do we make guaranteees about loaded relations?
- lib/routes/payment/stripe/post-pg.ts:381: // TODO(cgag): why is this ending up as 0?
- lib/routes/payment/stripe/post-pg.ts:386: // TODO(cgag): rename this, i think it's like the amount we're going to use
- lib/routes/payment/stripe/post-pg.ts:398: // TODO(cgag): seems very sketchy to return a dfeault value, should throw an error
- lib/routes/payment/stripe/post-pg.ts:405: // TODO(cgag): why are these being returned?
- lib/routes/payment/stripe/post-pg.ts:412:// TODO(cgag): should probably live somewhere else
- lib/routes/payment/stripe/post.ts:81: // TODO(cgag): note, none of this actually does anything, it's just building up
- lib/routes/payment/stripe/post.ts:117: // TODO(cgag): ok, so we create the payment/order/etc info and then
- lib/routes/payment/stripe/post.ts:124: // TODO(cgag): use await
- lib/routes/payment/stripe/post.ts:182: // TODO(cgag): is there any reason this is below tracking?
- lib/routes/referrals/get.ts:9:// TODO(cgag): if this is supposed to be the response type, the response is wrong because
- lib/routes/user/profile/get.ts:19: // TODO(cgag): include everything in the Profile type from userAction
- lib/routes/user/profile/get.ts:24: // TODO(cgag): which relations do we need? definitely cart. only things
- lib/routes/user/profile/get.ts:26: // TODO(cgag): we can find them in the profile type the frontend expects.
- lib/routes/user/profile/get.ts:28: // TODO(cgag): don't recognize most of those keys though, which is strange,
- lib/routes/user/profile/get.ts:33: // TODO(cgag): watchlist almost certainly not in the right format
- pg/entity/AffiliateInfo.ts:15:// TODO(cgag): not 100% on this pattern
- pg/entity/AffiliateInfo.ts:18:// TODO(cgag): not clear this should be a table?
- pg/entity/AffiliateInfo.ts:19:// TODO(cgag): Though if so, perhaps this should
- pg/entity/AffiliateInfo.ts:40: // TODO(cgag): this should almost certainly be an enum
- pg/entity/AffiliateInfo.ts:41: // TODO(cgag): allowing null for now because there's at least one affiliate info that just as
- pg/entity/AffiliateInfo.ts:46: // TODO(cgag): really can't tell if we should be carrying these around or not
- pg/entity/AffiliateInfo.ts:50: // TODO(cgag): createdAt / updatedAt?
- pg/entity/AffiliateOrder.ts:13:// TODO(cgag): not 100% on this pattern
- pg/entity/AffiliateOrder.ts:37: // TODO(cgag): cascades?
- pg/entity/CartItem.ts:20:// TODO(cgag): should we call this something else?
- pg/entity/CartItem.ts:35: // TODO(cgag): should it point to a real domain object?
- pg/entity/CartItem.ts:40: // TODO(cgag): use a proper type for this, it's an enum
- pg/entity/CartItem.ts:44: // TODO(cgag): are there more columns?
- pg/entity/CartItem.ts:45: // TODO(cgag): User | null?
- pg/entity/CoinbaseCharge.ts:15:// TODO(cgag): uniques
- pg/entity/CoinbaseCharge.ts:58: // TODO(cgag): maybe move to pricing idk
- pg/entity/CoinbaseCharge.ts:62: // TODO(cgag): enum? laways 'charge'?
- pg/entity/Domain.ts:19:// TODO(cgag): not 100% on this pattern
- pg/entity/Domain.ts:33: // TODO(cgag): handle relations
- pg/entity/Domain.ts:43: // TODO(cgag): possibly limited to like 10 characters or something,
- pg/entity/Domain.ts:45: // TODO(cgag): probably index this
- pg/entity/Domain.ts:50: // // TODO(cgag): this should be a named type for sure.
- pg/entity/Domain.ts:56: // TODO(cgag): wait, we actually want it to be structred like the json was right, is
- pg/entity/Domain.ts:61: // TODO(cgag): when don't we want cascade:true?
- pg/entity/Domain.ts:62: // TODO(cgag): which side does cascade really belong on?
- pg/entity/Domain.ts:63: // TODO(cgag): is it one to one, why do we have both "owners" and "owner" for purchases?
- pg/entity/Domain.ts:64: // TODO(cgag): it's many to many, but we should change it back to ManyToOne if we can pending talks with ryan.
- pg/entity/Domain.ts:65: // TODO(cgag): !! for now, removing this and making "purchases" the source of truth for ownership?? not sure that's the bes tidea really.
- pg/entity/Domain.ts:77: // TODO(cgag): do a join to avoid doing 2 queries
- pg/entity/Order.ts:16:// TODO(cgag): not 100% on this pattern
- pg/entity/Order.ts:17:// TODO(cgag): implement
- pg/entity/Order.ts:27:// TODO(cgag): don't forget to put indexes on all the foreign keys
- pg/entity/Order.ts:31: // TODO(cgag): how do these New constructors work with relationships? can we pass an id?
- pg/entity/Order.ts:36: // TODO(cgag): why i bother checking these if they're nullable? just assign
- pg/entity/Order.ts:57: // TODO(cgag): all firebaseIds should almost certainly be nullable, go back
- pg/entity/Order.ts:62: // TODO(cgag): this appears to be a relation (a firebaes id pointing to a payment)
- pg/entity/Order.ts:66: // TODO(cgag): what encoding? big integer, convert to postgres type?
- pg/entity/Order.ts:67: // TODO(cgag): default to now? some are null in the original data though,
- pg/entity/Order.ts:69: // TODO(cgag): how the fuck? seems to work on import but new Date().getTime() is too big for
- pg/entity/Order.ts:71: // TODO(cgag): lol woops, it's null for all of them
- pg/entity/Order.ts:76: // TODO(cgag): should we just default to 0 instead of nullable?
- pg/entity/Order.ts:77: // TODO(cgag): How many are null? Why are they null?
- pg/entity/Order.ts:81: // TODO(cgag): should we keep this around or just have a relationh?
- pg/entity/Order.ts:89: // TODO(cgag): doesn't seem to be cascading?
- pg/entity/Order.ts:93: // TODO(cgag): is it nullable? add | null?
- pg/entity/OrderItem.ts:11:// TODO(cgag): not 100% on this pattern
- pg/entity/OrderItem.ts:21:// TODO(cgag): a before insert/save hook to validate that order is going to get set??
- pg/entity/OrderItem.ts:25: // TODO(cgag): how do these New constructors work with relationships? can we pass an id?
- pg/entity/OrderItem.ts:34: // TODO(cgag): !! ok big problem potentially. Explicitly setting order to null,
- pg/entity/OrderItem.ts:48: // TODO(cgag): enum, surely exists
- pg/entity/OrderItem.ts:52: // TODO(cgag): could point a domain
- pg/entity/OrderItem.ts:59: // TODO(cgag): enum, surely exists
- pg/entity/Payment.ts:11:// TODO(cgag): this type won't live in this old model eventually
- pg/entity/Payment.ts:16:// TODO(cgag): not 100% on this pattern
- pg/entity/Payment.ts:21: // TODO(cgag): how do these New constructors work with relationships? can we pass an id?
- pg/entity/Payment.ts:35: // TODO(cgag): should definitely be an int but do we do that? how does
- pg/entity/Payment.ts:40: // TODO(cgag): should probably be called location (same with method, and perhaps the type names)
- pg/entity/Payment.ts:44: // TODO(cgag): make it non-nullable and default to 0?
- pg/entity/Payment.ts:54: // TODO(cgag): should we hold on to payment_user_firebase_id?
- pg/entity/Payment.ts:60: // TODO(cgag): relation, in json it's a firebase id, convert to postgres id.
- pg/entity/Payment.ts:65: // TODO(cgag): created/updatedat columns
- pg/entity/Purchase.ts:15:// TODO(cgag): not 100% on this pattern
- pg/entity/Purchase.ts:31: // TODO(cgag): use jblows @tag system or something, just making
- pg/entity/Purchase.ts:33: // TODO(cgag): implement me
- pg/entity/Purchase.ts:40: // TODO(cgag): give this enum a name somewhere, probably has one somewhere
- pg/entity/Purchase.ts:44: // TODO(cgag): why is this shere?
- pg/entity/Record.ts:12:// TODO(cgag): not 100% on this pattern
- pg/entity/Record.ts:18:// TODO(cgag): really hate types coming thr
- pg/entity/Record.ts:19:// TODO(cgag): some records have blank values, should that actually be allowed?
- pg/entity/Record.ts:22: // TODO(cgag): should it take a domain?
- pg/entity/Record.ts:33: // TODO(cgag): unsure on naming here, just key / value?
- pg/entity/Record.ts:40: // TODO(cgag): belongs to domain
- pg/entity/Record.ts:41: // TODO(cgag): cascades and such
- pg/entity/Record.ts:46: // TODO(cgag): does it being a foreign key imply not null?
- pg/entity/Referral.ts:12:// // TODO(cgag): not 100% on this pattern
- pg/entity/Referral.ts:25:// // TODO(cgag): maybe?
- pg/entity/Referral.ts:29:// // TODO(cgag): what is this really? affiliate_code?
- pg/entity/Referral.ts:35:// // TODO(cgag): createdAt / updatedAt?
- pg/entity/User.ts:31: // TODO(cgag): relations??
- pg/entity/User.ts:35:// TODO(cgag): validations and check constraints
- pg/entity/User.ts:39:// TODO(cgag): doesn't work, we have dupes, probably very bad?
- pg/entity/User.ts:45: // TODO(cgag): do something once we know what all
- pg/entity/User.ts:57: // TODO(cgag): ok, so we already have a ton of firebase ids floating around,
- pg/entity/User.ts:62: // TODO(cgag): add these created/updated columns to all entities?
- pg/entity/User.ts:69: // TODO(cgag): should be nullable?
- pg/entity/User.ts:74: // TODO(cgag): when can this be null? surely everyone has an email? there appear to be 8 users without
- pg/entity/User.ts:76: // TODO(cgag): ryan confirms it shouldn't be null and their emails are in firebase auth. Can we just delete them or should we
- pg/entity/User.ts:87: // TODO(cgag): I think it's safe to default this to false. It's never false in firebase,
- pg/entity/User.ts:92: // TODO(cgag): this one's nullable, or empty stringable at least,
- pg/entity/User.ts:94: // TODO(cgag): surely if it's nullable, the type should be string | null
- pg/entity/User.ts:98: // TODO(cgag): nullable / not empty?
- pg/entity/User.ts:99: // TODO(cgag): should it be | null, or should it be an optional key?
- pg/entity/User.ts:103: // TODO(cgag): nullable / not empty?
- pg/entity/User.ts:104: // TODO(cgag): what happens when you have nullable true, but the type is incorrectly just a string?
- pg/entity/User.ts:105: // TODO(cgag): try underscores or look into implementing / existing naming strategies
- pg/entity/User.ts:109: // TODO(cgag): primary key address here or as it's own table?
- pg/entity/User.ts:110: // TODO(cgag): should probably be "Domain[] | null". Why is it like this? why not empty?
- pg/entity/User.ts:124: // TODO(cgag): seems like it should just be called user, sticking with owner
- pg/entity/User.ts:129: // TODO(cgag): need to review cascades for basically everything
- pg/entity/WatchlistItem.ts:18:// TODO(cgag): does this object even need to exit? has many through?
- scripts/pg-import/prototyping.ts:25:// TODO(cgag): all this code assumes the db is empty, perhaps unacceptable. Make it safe to run multiple times?
- scripts/pg-import/prototyping.ts:28: // TODO(cgag): apparently type_orm by default uses stupid column names with capital leters
- scripts/pg-import/prototyping.ts:32: // TODO(cgag): how are these the same?
- scripts/pg-import/prototyping.ts:120: // TODO(cgag): why is this necessary?
- scripts/pg-import/prototyping.ts:151:// TODO(cgag): breaking stuff up doesn't work so well because everything is really
- scripts/pg-import/prototyping.ts:153:// TODO(cgag): !! If we're going to do this incrementally, then we need to be able to run
- scripts/pg-import/prototyping.ts:155:// TODO(cgag): worth tackling early?
- scripts/pg-import/prototyping.ts:164: // TODO(cgag): should normally never build objects without using the constructor,
- scripts/pg-import/prototyping.ts:189: // TODO(cgag): write some code or us jq to figure out if there are keys we're not handling.
- scripts/pg-import/prototyping.ts:191: // TODO(cgag): ok, so it's claiming to have saved users, but what the hell, where are they?
- scripts/pg-import/prototyping.ts:192: // ^ TODO(cgag): what the hell, if you do select * from user, you get just postgres, you have to
- scripts/pg-import/prototyping.ts:232: // TODO(cgag): could chunk this stuff below too
- scripts/pg-import/prototyping.ts:234: // TODO(cgag): if we care, optimize by batch looking up users / domains,
- scripts/pg-import/prototyping.ts:236: // TODO(cgag): use label to lookup a domain and point to it
- scripts/pg-import/prototyping.ts:243: // TODO(cgag): there only seems to be one, I don't remember
- scripts/pg-import/prototyping.ts:250: // TODO(cgag): need to turn on post slow query log and figure out what's goin on,
- scripts/pg-import/prototyping.ts:258: // TODO(cgag): probably a cleaner way to do this without temporary variables?
- scripts/pg-import/prototyping.ts:270: // TODO(cgag): how big of a problem is this, what do we do about the guy
- scripts/pg-import/prototyping.ts:291: // TODO(cgag): the pathing is unpredicable based on where you run the command from i think,
- scripts/pg-import/prototyping.ts:302: // TODO(cgag): what if there's a record but not a corresponding domain in purchases? is that ok?
- scripts/pg-import/prototyping.ts:304: // TODO(cgag): maybe there are domains in the puarches table that have no records, so we're missing them?
- scripts/pg-import/prototyping.ts:315: // TODO(cgag): perhaps all the code that needs the owner should pull it out of
- scripts/pg-import/prototyping.ts:317: // TODO(cgag): what is the pending key under owners about, when is it used?
- scripts/pg-import/prototyping.ts:320: // TODO(cgag): this is how the code works in the actual app,
- scripts/pg-import/prototyping.ts:332: // TODO(cgag): what should we do here?
- scripts/pg-import/prototyping.ts:334: // TODO(cgag): what now??
- scripts/pg-import/prototyping.ts:335: // TODO(cgag): just create the domain with no purchase, right?
- scripts/pg-import/prototyping.ts:341: // TODO(cgag): none of them have an owner, what?
- scripts/pg-import/prototyping.ts:345: // TODO(cgag): doesn't include records by default, need eager loading explicitly, maybe we can
- scripts/pg-import/prototyping.ts:360: // TODO(cgag): so it turns out there's like 7 payments thare are nested under
- scripts/pg-import/prototyping.ts:371: // TODO(cgag): handle these. how many are there? why are they? default to 0? delete them?
- scripts/pg-import/prototyping.ts:380: // TODO(cgag): can't just skip this, handle it
- scripts/pg-import/prototyping.ts:391: // TODO(cgag): shouldn't need this 'if', but we're no longer throwing (temporarily)
- scripts/pg-import/prototyping.ts:411:// TODO(cgag): what if one of them has a key we didn't notice.
- scripts/pg-import/prototyping.ts:431: // TODO(cgag): is it right to ignore this?
- scripts/pg-import/prototyping.ts:445: // TODO(cgag): it'd be a lot faster to have a separate order-item import
- scripts/pg-import/prototyping.ts:447: // TODO(cgag): actually, maybe we don't have ot save here at all since we cascade?
- scripts/pg-import/prototyping.ts:450: // TODO(cgag): perhaps this should be nullable
- scripts/pg-import/prototyping.ts:466: // TODO(cgag): what do we do here?
- scripts/pg-import/prototyping.ts:479: // TODO(cgag): this if should be unecesssary but we're not exiting on unfound
- scripts/pg-import/prototyping.ts:492: // TODO(cgag): why is this insanely slow, because it has to go update orer items? how can we do it quickly?
- scripts/pg-import/prototyping.ts:500:// TODO(cgag): need to do this for for stripe/post.
- scripts/pg-import/prototyping.ts:501:// TODO(cgag): woops, actually connect domains to users before doing this
- scripts/pg-import/prototyping.ts:531:// TODO(cgag): ^^^ well, talk to ryan about the two without a tier (check the db for codes)
- scripts/pg-import/prototyping.ts:533:// TODO(cgag): !!!! why isn't code "nye" in the results? probably means
- scripts/pg-import/prototyping.ts:535:// TODO(cgag): need to handle orders, should it be here or another function?
- scripts/pg-import/prototyping.ts:546: // TODO(cgag): so how do we handle the no affiliate id ones??
- scripts/pg-import/prototyping.ts:559: // TODO(cgag): what if we don't have a userId? are we handling htatcorrectly?
- scripts/pg-import/prototyping.ts:607: // TODO(cgag): talk to ryan about why some of these may have no userId
- scripts/pg-import/prototyping.ts:619: // TODO(cgag): there are a decent amount of them
- scripts/pg-import/prototyping.ts:620: // TODO(cgag): what the hell, one of them has the userId as "thatmartiniguywy@gmail.com"
- scripts/pg-import/prototyping.ts:621: // TODO(cgag): we should probably save the user id in a field life old_user_id or something
- scripts/pg-import/prototyping.ts:654: // TODO(cgag): user is OneToOne relationship but we're hitting a duplicate error, apparently
- scripts/pg-import/prototyping.ts:689: // // TODO(cgag): ok, welp, think this whole script is wrong and the watchlist
- scripts/pg-import/prototyping.ts:696: // // TODO(cgag): find or create?
- scripts/pg-import/prototyping.ts:710: // // TODO(cgag): this is definitely going to slow
- scripts/pg-import/prototyping.ts:767: // TODO(cgag): there are 5 degenerate cases with no code,
- scripts/pg-import/prototyping.ts:789:// TODO(cgag): why does this take so long to exit after main returns?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement