Favorite or Unfavorite Board

I'm trying to query all my boards and separate the one's that our favorited by the user versus unfavorited using a heart icon. I'm not quite sure how to set this up in the function stack for my db query. I think I need a conditional statement that when the condition is true it will use a heart_fill icon and when its false (or unfavorite) will use a heart_stroke icon.

I'm pretty confident this logic requires an if/then statement, but I'm not sure if my true or false expressions are setup correctly to achieve the desired result. It's giving me an error about the favorite variable, but I don't want to return that. I want it to simply evaluate to true (or false) in the expression, so it can pull the correct image on the front end (bravo studio) using the correct endpoint.

[Screen Shot 2021-09-14 at 9.52.53 AM.png]
Working with APIs
4 replies