ciyidogan commited on
Commit
7e65f30
·
verified ·
1 Parent(s): da0a0a8

Create admin.js

Browse files
Files changed (1) hide show
  1. static/js/admin.js +12 -0
static/js/admin.js ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ function seedTestData() {
2
+ apiPost('/project/seed/test_data', {})
3
+ .then(data => showResult('admin-result', data))
4
+ .catch(err => console.error(err));
5
+ }
6
+
7
+ function clearAllProjects() {
8
+ if (!confirm('Are you sure you want to clear all projects? This cannot be undone!')) return;
9
+ apiPost('/project/clear/all', {})
10
+ .then(data => showResult('admin-result', data))
11
+ .catch(err => console.error(err));
12
+ }