Advertisement
Guest User

Untitled

a guest
Aug 21st, 2019
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.93 KB | None | 0 0
  1. lib/app.ts:75:// TODO(cgag): need to start figuring out migrations by hand.
  2. lib/app.ts:76:// TODO(cgag): we have to keep all these firebase ids around because
  3. lib/dbTypes.ts:44:// TODO(cgag): why can this be empty string? that seems wrong
  4. lib/helpers/db-queries/affiliate-referrals.ts:6:// TODO(cgag): probably shouldn't only conditional return data, choose always or never
  5. lib/helpers/db-queries/affiliate-referrals.ts:7:// TODO(cgag): also shouldn't be modifying state of arguments
  6. lib/helpers/db-queries/affiliate-referrals.ts:100:// TODO(cgag): don't modify arguments
  7. lib/helpers/email/purchase-notification.ts:7:// TODO(cgag): emails are inconsistent in paramaeter order, make address
  8. lib/helpers/email/receipt.ts:5:// TODO(cgag): probably get rid of this, just a transitory
  9. lib/helpers/support/getUserCoinbaseOrders.ts:59:// TODO(cgag): too many functions don't have return types
  10. 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
  11. lib/middleware/__mocks__/authOnly.ts:7: // TODO(cgag): ^ but it probably shouldn't be
  12. lib/middleware/authOnly.ts:8: // TODO(cgag): ^ but it probably shouldn't be
  13. lib/model/order.ts:12:// TODO(cgag): do we need this purchase stuff at all or can we get it from domain owners?
  14. lib/model/order.ts:24:// TODO(cgag): this doesn't always actually set something in the db? is that right?
  15. lib/model/order.ts:46:// TODO(cgag): wait what, someetimes it returns a string and sometimes a promise?
  16. lib/model/order.ts:281: // TODO(cgag): woah, what are the semantics here? is this destructive
  17. lib/model/payment.ts:24:// TODO(cgag): goofy type, consider rewriting
  18. lib/model/user.ts:12:// TODO(cgag): need a type here
  19. lib/routes/mobile/domains/get.ts:41: // TODO(cgag): don't make types that are just arrays of other types
  20. lib/routes/payment/stripe/post-pg.test.ts:5:// TODO(cgag): delete? testing mocking
  21. lib/routes/payment/stripe/post-pg.test.ts:33:// TODO(cgag): some of this depends on having cloned unstoppable-dev to unstoppable-test
  22. lib/routes/payment/stripe/post-pg.test.ts:138: // TODO(cgag): is this sending out real emails to the business team?
  23. lib/routes/payment/stripe/post-pg.test.ts:146: // TODO(cgag): this has to match waht we put in the cart in beforeAll
  24. lib/routes/payment/stripe/post-pg.ts:39:// TODO(cgag): needs to be called with auth only
  25. lib/routes/payment/stripe/post-pg.ts:50:// TODO(cgag): should return error messages for each way it can go wrong.
  26. lib/routes/payment/stripe/post-pg.ts:77: // TODO(cgag): what the fuck is tokenId
  27. lib/routes/payment/stripe/post-pg.ts:81: // TODO(cgag): uh oh, createCharge uses tokenId, I don't really understand
  28. lib/routes/payment/stripe/post-pg.ts:92: // TODO(cgag): had to type this as any for my stupid test. What about with mocking?
  29. lib/routes/payment/stripe/post-pg.ts:119: // TODO(cgag): real error handling
  30. lib/routes/payment/stripe/post-pg.ts:125: // TODO(cgag): test with someone who actually has cart items
  31. lib/routes/payment/stripe/post-pg.ts:126: // TODO(cgag): should this just pass in items instead of user?
  32. lib/routes/payment/stripe/post-pg.ts:130: // TODO(cgag): use constructor?
  33. 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?
  34. lib/routes/payment/stripe/post-pg.ts:170: // TODO(cgag): error handling
  35. lib/routes/payment/stripe/post-pg.ts:186: // TODO(cgag): probably don't want tests hitting stripe or tracking apis...
  36. lib/routes/payment/stripe/post-pg.ts:201: // TODO(cgag): transaction (or rely on cascades, which have an implicit transaction)
  37. lib/routes/payment/stripe/post-pg.ts:208: // TODO(cgag): wait! never use referral code? always use affiliateInfo.code?
  38. lib/routes/payment/stripe/post-pg.ts:248: // an if guard. Don't know why. Don't have internet. TODO(cgag): find out later.
  39. lib/routes/payment/stripe/post-pg.ts:258: // TODO(cgag): does it matter if we use user.firebaseid vs user.id?
  40. 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,
  41. 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,
  42. lib/routes/payment/stripe/post-pg.ts:312:// TODO(cgag): never use function keyword since rest of the codebase doesn't
  43. lib/routes/payment/stripe/post-pg.ts:313:// TODO(cgag): how do we ensure the user we're passed was loaded
  44. lib/routes/payment/stripe/post-pg.ts:316:// TODO(cgag): have ryan confirm this logic is good
  45. lib/routes/payment/stripe/post-pg.ts:334:// TODO(cgag): break up this function?
  46. lib/routes/payment/stripe/post-pg.ts:335:// TODO(cgag): pass in a User
  47. lib/routes/payment/stripe/post-pg.ts:349: // TODO(cgag): how do we make guaranteees about loaded relations?
  48. lib/routes/payment/stripe/post-pg.ts:381: // TODO(cgag): why is this ending up as 0?
  49. lib/routes/payment/stripe/post-pg.ts:386: // TODO(cgag): rename this, i think it's like the amount we're going to use
  50. lib/routes/payment/stripe/post-pg.ts:398: // TODO(cgag): seems very sketchy to return a dfeault value, should throw an error
  51. lib/routes/payment/stripe/post-pg.ts:405: // TODO(cgag): why are these being returned?
  52. lib/routes/payment/stripe/post-pg.ts:412:// TODO(cgag): should probably live somewhere else
  53. lib/routes/payment/stripe/post.ts:81: // TODO(cgag): note, none of this actually does anything, it's just building up
  54. lib/routes/payment/stripe/post.ts:117: // TODO(cgag): ok, so we create the payment/order/etc info and then
  55. lib/routes/payment/stripe/post.ts:124: // TODO(cgag): use await
  56. lib/routes/payment/stripe/post.ts:182: // TODO(cgag): is there any reason this is below tracking?
  57. lib/routes/referrals/get.ts:9:// TODO(cgag): if this is supposed to be the response type, the response is wrong because
  58. lib/routes/user/profile/get.ts:19: // TODO(cgag): include everything in the Profile type from userAction
  59. lib/routes/user/profile/get.ts:24: // TODO(cgag): which relations do we need? definitely cart. only things
  60. lib/routes/user/profile/get.ts:26: // TODO(cgag): we can find them in the profile type the frontend expects.
  61. lib/routes/user/profile/get.ts:28: // TODO(cgag): don't recognize most of those keys though, which is strange,
  62. lib/routes/user/profile/get.ts:33: // TODO(cgag): watchlist almost certainly not in the right format
  63. pg/entity/AffiliateInfo.ts:15:// TODO(cgag): not 100% on this pattern
  64. pg/entity/AffiliateInfo.ts:18:// TODO(cgag): not clear this should be a table?
  65. pg/entity/AffiliateInfo.ts:19:// TODO(cgag): Though if so, perhaps this should
  66. pg/entity/AffiliateInfo.ts:40: // TODO(cgag): this should almost certainly be an enum
  67. pg/entity/AffiliateInfo.ts:41: // TODO(cgag): allowing null for now because there's at least one affiliate info that just as
  68. pg/entity/AffiliateInfo.ts:46: // TODO(cgag): really can't tell if we should be carrying these around or not
  69. pg/entity/AffiliateInfo.ts:50: // TODO(cgag): createdAt / updatedAt?
  70. pg/entity/AffiliateOrder.ts:13:// TODO(cgag): not 100% on this pattern
  71. pg/entity/AffiliateOrder.ts:37: // TODO(cgag): cascades?
  72. pg/entity/CartItem.ts:20:// TODO(cgag): should we call this something else?
  73. pg/entity/CartItem.ts:35: // TODO(cgag): should it point to a real domain object?
  74. pg/entity/CartItem.ts:40: // TODO(cgag): use a proper type for this, it's an enum
  75. pg/entity/CartItem.ts:44: // TODO(cgag): are there more columns?
  76. pg/entity/CartItem.ts:45: // TODO(cgag): User | null?
  77. pg/entity/CoinbaseCharge.ts:15:// TODO(cgag): uniques
  78. pg/entity/CoinbaseCharge.ts:58: // TODO(cgag): maybe move to pricing idk
  79. pg/entity/CoinbaseCharge.ts:62: // TODO(cgag): enum? laways 'charge'?
  80. pg/entity/Domain.ts:19:// TODO(cgag): not 100% on this pattern
  81. pg/entity/Domain.ts:33: // TODO(cgag): handle relations
  82. pg/entity/Domain.ts:43: // TODO(cgag): possibly limited to like 10 characters or something,
  83. pg/entity/Domain.ts:45: // TODO(cgag): probably index this
  84. pg/entity/Domain.ts:50: // // TODO(cgag): this should be a named type for sure.
  85. pg/entity/Domain.ts:56: // TODO(cgag): wait, we actually want it to be structred like the json was right, is
  86. pg/entity/Domain.ts:61: // TODO(cgag): when don't we want cascade:true?
  87. pg/entity/Domain.ts:62: // TODO(cgag): which side does cascade really belong on?
  88. pg/entity/Domain.ts:63: // TODO(cgag): is it one to one, why do we have both "owners" and "owner" for purchases?
  89. 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.
  90. 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.
  91. pg/entity/Domain.ts:77: // TODO(cgag): do a join to avoid doing 2 queries
  92. pg/entity/Order.ts:16:// TODO(cgag): not 100% on this pattern
  93. pg/entity/Order.ts:17:// TODO(cgag): implement
  94. pg/entity/Order.ts:27:// TODO(cgag): don't forget to put indexes on all the foreign keys
  95. pg/entity/Order.ts:31: // TODO(cgag): how do these New constructors work with relationships? can we pass an id?
  96. pg/entity/Order.ts:36: // TODO(cgag): why i bother checking these if they're nullable? just assign
  97. pg/entity/Order.ts:57: // TODO(cgag): all firebaseIds should almost certainly be nullable, go back
  98. pg/entity/Order.ts:62: // TODO(cgag): this appears to be a relation (a firebaes id pointing to a payment)
  99. pg/entity/Order.ts:66: // TODO(cgag): what encoding? big integer, convert to postgres type?
  100. pg/entity/Order.ts:67: // TODO(cgag): default to now? some are null in the original data though,
  101. pg/entity/Order.ts:69: // TODO(cgag): how the fuck? seems to work on import but new Date().getTime() is too big for
  102. pg/entity/Order.ts:71: // TODO(cgag): lol woops, it's null for all of them
  103. pg/entity/Order.ts:76: // TODO(cgag): should we just default to 0 instead of nullable?
  104. pg/entity/Order.ts:77: // TODO(cgag): How many are null? Why are they null?
  105. pg/entity/Order.ts:81: // TODO(cgag): should we keep this around or just have a relationh?
  106. pg/entity/Order.ts:89: // TODO(cgag): doesn't seem to be cascading?
  107. pg/entity/Order.ts:93: // TODO(cgag): is it nullable? add | null?
  108. pg/entity/OrderItem.ts:11:// TODO(cgag): not 100% on this pattern
  109. pg/entity/OrderItem.ts:21:// TODO(cgag): a before insert/save hook to validate that order is going to get set??
  110. pg/entity/OrderItem.ts:25: // TODO(cgag): how do these New constructors work with relationships? can we pass an id?
  111. pg/entity/OrderItem.ts:34: // TODO(cgag): !! ok big problem potentially. Explicitly setting order to null,
  112. pg/entity/OrderItem.ts:48: // TODO(cgag): enum, surely exists
  113. pg/entity/OrderItem.ts:52: // TODO(cgag): could point a domain
  114. pg/entity/OrderItem.ts:59: // TODO(cgag): enum, surely exists
  115. pg/entity/Payment.ts:11:// TODO(cgag): this type won't live in this old model eventually
  116. pg/entity/Payment.ts:16:// TODO(cgag): not 100% on this pattern
  117. pg/entity/Payment.ts:21: // TODO(cgag): how do these New constructors work with relationships? can we pass an id?
  118. pg/entity/Payment.ts:35: // TODO(cgag): should definitely be an int but do we do that? how does
  119. pg/entity/Payment.ts:40: // TODO(cgag): should probably be called location (same with method, and perhaps the type names)
  120. pg/entity/Payment.ts:44: // TODO(cgag): make it non-nullable and default to 0?
  121. pg/entity/Payment.ts:54: // TODO(cgag): should we hold on to payment_user_firebase_id?
  122. pg/entity/Payment.ts:60: // TODO(cgag): relation, in json it's a firebase id, convert to postgres id.
  123. pg/entity/Payment.ts:65: // TODO(cgag): created/updatedat columns
  124. pg/entity/Purchase.ts:15:// TODO(cgag): not 100% on this pattern
  125. pg/entity/Purchase.ts:31: // TODO(cgag): use jblows @tag system or something, just making
  126. pg/entity/Purchase.ts:33: // TODO(cgag): implement me
  127. pg/entity/Purchase.ts:40: // TODO(cgag): give this enum a name somewhere, probably has one somewhere
  128. pg/entity/Purchase.ts:44: // TODO(cgag): why is this shere?
  129. pg/entity/Record.ts:12:// TODO(cgag): not 100% on this pattern
  130. pg/entity/Record.ts:18:// TODO(cgag): really hate types coming thr
  131. pg/entity/Record.ts:19:// TODO(cgag): some records have blank values, should that actually be allowed?
  132. pg/entity/Record.ts:22: // TODO(cgag): should it take a domain?
  133. pg/entity/Record.ts:33: // TODO(cgag): unsure on naming here, just key / value?
  134. pg/entity/Record.ts:40: // TODO(cgag): belongs to domain
  135. pg/entity/Record.ts:41: // TODO(cgag): cascades and such
  136. pg/entity/Record.ts:46: // TODO(cgag): does it being a foreign key imply not null?
  137. pg/entity/Referral.ts:12:// // TODO(cgag): not 100% on this pattern
  138. pg/entity/Referral.ts:25:// // TODO(cgag): maybe?
  139. pg/entity/Referral.ts:29:// // TODO(cgag): what is this really? affiliate_code?
  140. pg/entity/Referral.ts:35:// // TODO(cgag): createdAt / updatedAt?
  141. pg/entity/User.ts:31: // TODO(cgag): relations??
  142. pg/entity/User.ts:35:// TODO(cgag): validations and check constraints
  143. pg/entity/User.ts:39:// TODO(cgag): doesn't work, we have dupes, probably very bad?
  144. pg/entity/User.ts:45: // TODO(cgag): do something once we know what all
  145. pg/entity/User.ts:57: // TODO(cgag): ok, so we already have a ton of firebase ids floating around,
  146. pg/entity/User.ts:62: // TODO(cgag): add these created/updated columns to all entities?
  147. pg/entity/User.ts:69: // TODO(cgag): should be nullable?
  148. pg/entity/User.ts:74: // TODO(cgag): when can this be null? surely everyone has an email? there appear to be 8 users without
  149. 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
  150. pg/entity/User.ts:87: // TODO(cgag): I think it's safe to default this to false. It's never false in firebase,
  151. pg/entity/User.ts:92: // TODO(cgag): this one's nullable, or empty stringable at least,
  152. pg/entity/User.ts:94: // TODO(cgag): surely if it's nullable, the type should be string | null
  153. pg/entity/User.ts:98: // TODO(cgag): nullable / not empty?
  154. pg/entity/User.ts:99: // TODO(cgag): should it be | null, or should it be an optional key?
  155. pg/entity/User.ts:103: // TODO(cgag): nullable / not empty?
  156. pg/entity/User.ts:104: // TODO(cgag): what happens when you have nullable true, but the type is incorrectly just a string?
  157. pg/entity/User.ts:105: // TODO(cgag): try underscores or look into implementing / existing naming strategies
  158. pg/entity/User.ts:109: // TODO(cgag): primary key address here or as it's own table?
  159. pg/entity/User.ts:110: // TODO(cgag): should probably be "Domain[] | null". Why is it like this? why not empty?
  160. pg/entity/User.ts:124: // TODO(cgag): seems like it should just be called user, sticking with owner
  161. pg/entity/User.ts:129: // TODO(cgag): need to review cascades for basically everything
  162. pg/entity/WatchlistItem.ts:18:// TODO(cgag): does this object even need to exit? has many through?
  163. 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?
  164. scripts/pg-import/prototyping.ts:28: // TODO(cgag): apparently type_orm by default uses stupid column names with capital leters
  165. scripts/pg-import/prototyping.ts:32: // TODO(cgag): how are these the same?
  166. scripts/pg-import/prototyping.ts:120: // TODO(cgag): why is this necessary?
  167. scripts/pg-import/prototyping.ts:151:// TODO(cgag): breaking stuff up doesn't work so well because everything is really
  168. scripts/pg-import/prototyping.ts:153:// TODO(cgag): !! If we're going to do this incrementally, then we need to be able to run
  169. scripts/pg-import/prototyping.ts:155:// TODO(cgag): worth tackling early?
  170. scripts/pg-import/prototyping.ts:164: // TODO(cgag): should normally never build objects without using the constructor,
  171. 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.
  172. scripts/pg-import/prototyping.ts:191: // TODO(cgag): ok, so it's claiming to have saved users, but what the hell, where are they?
  173. scripts/pg-import/prototyping.ts:192: // ^ TODO(cgag): what the hell, if you do select * from user, you get just postgres, you have to
  174. scripts/pg-import/prototyping.ts:232: // TODO(cgag): could chunk this stuff below too
  175. scripts/pg-import/prototyping.ts:234: // TODO(cgag): if we care, optimize by batch looking up users / domains,
  176. scripts/pg-import/prototyping.ts:236: // TODO(cgag): use label to lookup a domain and point to it
  177. scripts/pg-import/prototyping.ts:243: // TODO(cgag): there only seems to be one, I don't remember
  178. scripts/pg-import/prototyping.ts:250: // TODO(cgag): need to turn on post slow query log and figure out what's goin on,
  179. scripts/pg-import/prototyping.ts:258: // TODO(cgag): probably a cleaner way to do this without temporary variables?
  180. scripts/pg-import/prototyping.ts:270: // TODO(cgag): how big of a problem is this, what do we do about the guy
  181. scripts/pg-import/prototyping.ts:291: // TODO(cgag): the pathing is unpredicable based on where you run the command from i think,
  182. scripts/pg-import/prototyping.ts:302: // TODO(cgag): what if there's a record but not a corresponding domain in purchases? is that ok?
  183. 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?
  184. scripts/pg-import/prototyping.ts:315: // TODO(cgag): perhaps all the code that needs the owner should pull it out of
  185. scripts/pg-import/prototyping.ts:317: // TODO(cgag): what is the pending key under owners about, when is it used?
  186. scripts/pg-import/prototyping.ts:320: // TODO(cgag): this is how the code works in the actual app,
  187. scripts/pg-import/prototyping.ts:332: // TODO(cgag): what should we do here?
  188. scripts/pg-import/prototyping.ts:334: // TODO(cgag): what now??
  189. scripts/pg-import/prototyping.ts:335: // TODO(cgag): just create the domain with no purchase, right?
  190. scripts/pg-import/prototyping.ts:341: // TODO(cgag): none of them have an owner, what?
  191. scripts/pg-import/prototyping.ts:345: // TODO(cgag): doesn't include records by default, need eager loading explicitly, maybe we can
  192. scripts/pg-import/prototyping.ts:360: // TODO(cgag): so it turns out there's like 7 payments thare are nested under
  193. scripts/pg-import/prototyping.ts:371: // TODO(cgag): handle these. how many are there? why are they? default to 0? delete them?
  194. scripts/pg-import/prototyping.ts:380: // TODO(cgag): can't just skip this, handle it
  195. scripts/pg-import/prototyping.ts:391: // TODO(cgag): shouldn't need this 'if', but we're no longer throwing (temporarily)
  196. scripts/pg-import/prototyping.ts:411:// TODO(cgag): what if one of them has a key we didn't notice.
  197. scripts/pg-import/prototyping.ts:431: // TODO(cgag): is it right to ignore this?
  198. scripts/pg-import/prototyping.ts:445: // TODO(cgag): it'd be a lot faster to have a separate order-item import
  199. scripts/pg-import/prototyping.ts:447: // TODO(cgag): actually, maybe we don't have ot save here at all since we cascade?
  200. scripts/pg-import/prototyping.ts:450: // TODO(cgag): perhaps this should be nullable
  201. scripts/pg-import/prototyping.ts:466: // TODO(cgag): what do we do here?
  202. scripts/pg-import/prototyping.ts:479: // TODO(cgag): this if should be unecesssary but we're not exiting on unfound
  203. 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?
  204. scripts/pg-import/prototyping.ts:500:// TODO(cgag): need to do this for for stripe/post.
  205. scripts/pg-import/prototyping.ts:501:// TODO(cgag): woops, actually connect domains to users before doing this
  206. scripts/pg-import/prototyping.ts:531:// TODO(cgag): ^^^ well, talk to ryan about the two without a tier (check the db for codes)
  207. scripts/pg-import/prototyping.ts:533:// TODO(cgag): !!!! why isn't code "nye" in the results? probably means
  208. scripts/pg-import/prototyping.ts:535:// TODO(cgag): need to handle orders, should it be here or another function?
  209. scripts/pg-import/prototyping.ts:546: // TODO(cgag): so how do we handle the no affiliate id ones??
  210. scripts/pg-import/prototyping.ts:559: // TODO(cgag): what if we don't have a userId? are we handling htatcorrectly?
  211. scripts/pg-import/prototyping.ts:607: // TODO(cgag): talk to ryan about why some of these may have no userId
  212. scripts/pg-import/prototyping.ts:619: // TODO(cgag): there are a decent amount of them
  213. scripts/pg-import/prototyping.ts:620: // TODO(cgag): what the hell, one of them has the userId as "thatmartiniguywy@gmail.com"
  214. scripts/pg-import/prototyping.ts:621: // TODO(cgag): we should probably save the user id in a field life old_user_id or something
  215. scripts/pg-import/prototyping.ts:654: // TODO(cgag): user is OneToOne relationship but we're hitting a duplicate error, apparently
  216. scripts/pg-import/prototyping.ts:689: // // TODO(cgag): ok, welp, think this whole script is wrong and the watchlist
  217. scripts/pg-import/prototyping.ts:696: // // TODO(cgag): find or create?
  218. scripts/pg-import/prototyping.ts:710: // // TODO(cgag): this is definitely going to slow
  219. scripts/pg-import/prototyping.ts:767: // TODO(cgag): there are 5 degenerate cases with no code,
  220. 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