-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcreateThirdPartyApps.js
55 lines (39 loc) · 1.29 KB
/
createThirdPartyApps.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
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
// Using ES6 imports
import mongoose from 'mongoose';
import './dbconnection.js';
import ThirdPartyApp from './thirdPartyApps.js';
mongoose.Promise = global.Promise;
const main = async() => {
try{
/***********************************************************************************/
//create new app object
const googleSheets = {
"name": "Google Sheets API",
"active": false,
}
//call create to save the new app to the database
await ThirdPartyApp.create(googleSheets);
const googleFCM = {
"name": "Google FCM Push",
"active": false,
}
//call create to save the new app to the database
await ThirdPartyApp.create(googleFCM);
const googleAutocomplete = {
"name": "Google Autocomplete API",
"active": false,
}
//call create to save the new app to the database
await ThirdPartyApp.create(googleAutocomplete);
const googleMapsEmbed = {
"name": "Google Maps Embed API",
"active": false,
}
//call create to save the new app to the database
await ThirdPartyApp.create(googleMapsEmbed);
}
catch(error){
console.log(`main error: ${error}`);
}
}
main();