Skip to content

Commit

Permalink
adds better fallback image for CIP profiles
Browse files Browse the repository at this point in the history
  • Loading branch information
davelandry committed May 7, 2019
1 parent 528ab50 commit 74fce49
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion api/profileImage.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ module.exports = function(app) {
/** Sends the finally found image, and includes fallbacks */
async function sendImage(image) {

const id = image ? image : pslug === "university" ? "2032" : "1849";
const id = image ? image
: pslug === "university" ? "2032"
: pslug === "cip" ? "2032"
: "1849";

if (size === "json") {
const resp = await db.images.findOne({where: {id}});
res.json(resp);
Expand Down

0 comments on commit 74fce49

Please sign in to comment.