forked from binvant/MakeMyCareer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
script-job-post.js
27 lines (26 loc) · 896 Bytes
/
script-job-post.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
function postjob(){
let company_name = $('#Cname').val();
let position = $('#Pname').val();
let skills = $('#skills').val();
$.ajax({
headers: {
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Headers': '*',
'Access-Control-Allow-Methods': 'OPTIONS, POST',
'Content-Type': 'application/json'
},
contentType: "application/json",
method: "POST",
url: "https://e3uyya0frh.execute-api.us-east-1.amazonaws.com/dev/createjob",
data: JSON.stringify({
"company": company_name,
"position": position,
"skills": skills,
"recruiter": localStorage.getItem("id"),
"job_description": $('#JD').val(),
"jobUrl": $('#jobUrl').val()
})
}).done(function() {
$(this).addClass( "done" );
});
}