stuysu / epsilon

all in one service for stuyvesant high school.
4 stars 0 forks source link

Code Refactoring Request: Supabase queries #105

Open randysim opened 2 days ago

randysim commented 2 days ago

Supabase generally returns an array of data, even if you're using a unique identifier such as an id to look for an object. I'm an idiot and instead of doing things the right way I just took out the first element of the array.

https://supabase.com/docs/reference/javascript/single

but you could use .limit(1) and .single to make the code cleaner

This would save lines of code and make it slightly more optimized! just a peeve right now.