Skip to content

Instantly share code, notes, and snippets.

@christopherbauer
Created May 18, 2024 16:38
Show Gist options
  • Save christopherbauer/0906a3fe97c68dd54ca829739a907196 to your computer and use it in GitHub Desktop.
Save christopherbauer/0906a3fe97c68dd54ca829739a907196 to your computer and use it in GitHub Desktop.
/** ... ***/
app.route("/persona").get(async (req, res) => {
const personas = getPersonas();
const personaMap = personas.map((p) => ({
id: p.id,
name: p.name,
imageUri: p.imageUri,
}));
res.status(200).send(personaMap);
});
/** ... ***/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment