fiari

They're interesting, the links.

Chippin Away Chippin Away Chippin Away Now

August 25, 2023

I started this post on August 11th - there have been a lot of unsexy and tedious updates done in the background and I've been playing a ton of Valheim lately - my base is coming along nicely, thanks for asking - so I haven't dug too deeply into the API pile ahead of me until today (25th). I've been trying to figure out how to best protect content while still allowing lurkers. It'll be ongoing but I have some flexibility to decide down the road.

Notes

  • Optimized mongodb connections (hopefully). I'm not used to how mongodb connections are handled on a serverless environment like nextjs but the connection seems to cache now and not open up multiple times.
  • Created the flow for created new user records, which also fires off an empty profile creation. This flow also checks to see if username & profile number cry_fieri#4020 exists, otherwise if the combo is unique you can go for it.
  • Need to figure out how to get user context dispersed to all pages and components.
  • Listed out (almost all of) the API endpoints we'll need. It's not a few haha. Maybe I'll publish that and update it as I go along.

APIs

Chippin away. Need to figure out where to segregate the protected endpoints if we're going to allow lurking. I don't want to hide public stuff behind auth, yeardme.

Users

Latest work on the users API.

  • [x] Get user by ID
  • [x] Get user by username
  • [x] Get user by email