Last active
October 29, 2021 18:20
-
-
Save SidneyAllen/1e874ab83618cd0e57da1ecd5365353f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// templates/list.js | |
import fetch from "node-fetch"; | |
export default async function listTemplate(req, res) { | |
const response = await fetch("https://api.lob.com/v1/templates", { | |
headers: { | |
Authorization: `Basic ${Buffer.from( | |
process.env.LOB_SECRET_API_KEY + ":" | |
).toString("base64")}`, | |
}, | |
}); | |
const templates = await response.json(); | |
res.send(templates.data); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment