Skip to content

Commit 7cb4a78

Browse files
verbose-fy seedlands
1 parent 3eb13a5 commit 7cb4a78

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/db/scripts/seed-defaultlangs.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import {ApiKeyAttrs, ApiKeys, db, Langs, LangsAttributes} from '../models'
22

33
db.sync()
44
.then(() => Langs.sync({force:true}))
5+
.then(async () => {console.log('Languages Synced')})
56
.then(() =>
67
Langs.bulkCreate(<LangsAttributes[]>[
78
{ lang_slug: 'py2', lang_name: 'Python', lang_version: '2.7' },
@@ -10,11 +11,15 @@ db.sync()
1011
{ lang_slug: 'cpp', lang_name: 'C++', lang_version: '11' },
1112
{ lang_slug: 'c', lang_name: 'C', lang_version: '6' }
1213
]))
14+
.then(async () => {console.log('Languages Seeded')})
1315
.then(() => ApiKeys.sync({force: true}))
16+
.then(async () => {console.log('API Keys Synced')})
1417
.then(() =>
1518
ApiKeys.bulkCreate(<ApiKeyAttrs[]>[
1619
{id: 1, key: '7718330d2794406c980bdbded6c9dc1d', whitelist_domains: ['*'], whitelist_ips: ['*']}
1720
]))
21+
.then(async () => {console.log('API Keys Seeded')})
22+
.catch(console.error)
1823
.finally(() => {
1924
try {
2025
db.close()

0 commit comments

Comments
 (0)