Commit f0cb13f8 authored by Emika Chamodi's avatar Emika Chamodi

local changes

parent 6d26cf12
...@@ -13,6 +13,7 @@ router.post( ...@@ -13,6 +13,7 @@ router.post(
async (req: TypedRequest<{ userId: string }, CandidateType>, res) => { async (req: TypedRequest<{ userId: string }, CandidateType>, res) => {
try { try {
const update = req.body; const update = req.body;
await Candidates.findByIdAndUpdate(req.query.userId, { $set: update });
if (req.body?.resume) { if (req.body?.resume) {
const data: any = await ResumeAPI.extractResumeData({ const data: any = await ResumeAPI.extractResumeData({
user_id: req.query.userId, user_id: req.query.userId,
...@@ -26,7 +27,7 @@ router.post( ...@@ -26,7 +27,7 @@ router.post(
video_url: req.body.selfIntro, video_url: req.body.selfIntro,
}); });
} }
await Candidates.findByIdAndUpdate(req.query.userId, { $set: req.body });
return res.status(200).json({ data: req.body }); return res.status(200).json({ data: req.body });
} catch (error) { } catch (error) {
return res.status(400).send(error); return res.status(400).send(error);
......
...@@ -31,7 +31,7 @@ export const request = ( ...@@ -31,7 +31,7 @@ export const request = (
data, data,
params, params,
headers, headers,
timeout: 30000, timeout: 90000,
}) })
.then(async (response: AxiosResponse) => { .then(async (response: AxiosResponse) => {
resolve(response.data); resolve(response.data);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment