-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsubmit-application.js
More file actions
68 lines (56 loc) · 2.99 KB
/
submit-application.js
File metadata and controls
68 lines (56 loc) · 2.99 KB
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
// Helper script to submit application to WindBorne Systems
// Usage: node submit-application.js
// Note: Requires Node.js 18+ (for native fetch) or install node-fetch: npm install node-fetch
// IMPORTANT: Fill in your details below before running this script
const applicationData = {
name: "Preetham Dandu",
email: "preethamdandu8@gmail.com",
role: "Junior Web Developer",
notes: "As a software engineer with experience building production-grade real-time systems and ETL pipelines, I excel at collaborating across research and industry teams to deliver robust, scalable solutions that handle complex data challenges. I chose the Open-Meteo weather API to combine with WindBorne's balloon data because it provides reliable, real-time atmospheric measurements that enable meaningful analysis of how ground-level weather conditions correlate with high-altitude balloon trajectories, creating a comprehensive view of atmospheric dynamics that demonstrates the practical value of combining diverse data sources.",
submission_url: "https://windborne-application-task.vercel.app",
portfolio_url: "https://preethamdandu.github.io/portfolio/",
resume_url: "https://drive.google.com/file/d/1dVdSpnYaIG-V0N0HqOVdTZJtyegRRvVX/view?usp=sharing"
};
async function submitApplication() {
const url = 'https://windbornesystems.com/career_applications.json';
// Wrap data in career_application object as required by the API
const payload = {
career_application: applicationData
};
try {
console.log('Submitting application...');
console.log('Data:', JSON.stringify(payload, null, 2));
const response = await fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(payload)
});
const responseData = await response.json();
if (response.ok && response.status === 200) {
console.log('✅ Application submitted successfully!');
console.log('Response:', responseData);
} else {
console.error('❌ Application submission failed');
console.error('Status:', response.status);
console.error('Response:', responseData);
}
} catch (error) {
console.error('❌ Error submitting application:', error.message);
}
}
// Check if all required fields are filled
const requiredFields = ['name', 'email', 'submission_url', 'portfolio_url', 'resume_url'];
const missingFields = requiredFields.filter(field =>
applicationData[field] === undefined ||
applicationData[field].startsWith('YOUR_') ||
applicationData[field] === ''
);
if (missingFields.length > 0) {
console.error('❌ Please fill in all required fields:');
missingFields.forEach(field => console.error(` - ${field}`));
console.error('\nEdit this file and update the applicationData object with your information.');
process.exit(1);
}
submitApplication();