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
// This function does the following | |
// 1. fetches the PDF resume from the url provided | |
// 2. creates a file object with the resume data | |
// 3. triggers the change event on the file input element | |
// 4. the file input element gets the file object | |
// 5. the file object is uploaded to the website | |
async function handleResumeInput(remoteResumeURL) { |
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
import axios from "axios"; | |
const baseUrlMainServer = | |
process.env.ENV === "PROD" | |
? "https://api.project28.in" | |
: process.env.ENV === "QA" | |
? "https://qa.project28.in" | |
: (process.env.ENV = "DEV" | |
? "https://backend-staging.project28.in" | |
: "http://localhost:5000"); |
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
import axios from "axios"; | |
const baseUrlMainServer = | |
process.env.ENV === "PROD" | |
? "https://api.project28.in" | |
: process.env.ENV === "QA" | |
? "https://qa.project28.in" | |
: (process.env.ENV = "DEV" | |
? "https://backend-staging.project28.in" | |
: "http://localhost:5000"); |
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
app.get("/sileo-depiction-revalidate/:package", async (req, res) => { | |
const dep_package = req.params.package; // package name | |
try { | |
const redisDepKey = `${dep_package}:depiction`; // redis key | |
return client.del(redisDepKey, async (err, success) => { // check if cached | |
if (success == 1) { // if success | |
res.status(200).send({ // send success acknowledgement | |
httpStatus: 200, | |
success: true, |
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
app.get("/sileo-depiction/:package", async (req, res) => { | |
const dep_package = req.params.package; // package name | |
try { | |
const redisDepKey = `${dep_package}:depiction`; // redis key | |
return client.get(redisDepKey, async (err, cachedData) => { // check if cached | |
if (cachedData) { // if cached | |
const parsedData = JSON.parse(depiction); // parse cached data | |
res.status(200).send({ // send cached data | |
httpStatus: 200, |