diff options
| author | kumar <kumar.damani@mail.utoronto.ca> | 2016-07-21 12:48:48 +0000 |
|---|---|---|
| committer | kumar <kumar.damani@mail.utoronto.ca> | 2016-07-21 12:48:48 +0000 |
| commit | be3bd188425e9ae6ff144a7151ce217bc143ce4f (patch) | |
| tree | 114cd3ca422b47fb6174028cf551d674428c4545 /testImports.js | |
| parent | 7f385f73ebc024e2c07e628fc1500bcb21b69837 (diff) | |
same as last one
Diffstat (limited to 'testImports.js')
| -rw-r--r-- | testImports.js | 58 |
1 files changed, 41 insertions, 17 deletions
diff --git a/testImports.js b/testImports.js index c9f0bb2..7ce9e1c 100644 --- a/testImports.js +++ b/testImports.js @@ -18,13 +18,13 @@ var questions_array = ["this is q1", "this is q2"]; //test getting all exams database functionality -- USE FOR THE EXAMS PAGES maybe? /*dbFile.get_all_exams("CSC240", function (exams) { - if (exams.length == 0){ - console.log("Nothing was found"); - } - else { - console.log(exams); - } -});*/ + if (exams.length == 0){ + console.log("Nothing was found"); + } + else { + console.log(exams); + } + });*/ //test adding course // dbFile.add_course("CSC148", "Intro to Programming"); @@ -41,14 +41,38 @@ var questions_array = ["this is q1", "this is q2"]; //test adding of comments given a solution_id, and the comment information as an array -// dbFile.add_comment("578f08e43bba452ee98da444", ["this is asdfasdf", "this is the date", "this is the author"]); +//dbFile.add_comment("578f08e43bba452ee98da444", ["this is asdfasdf", "this is the author"]); + + +/* + dbFile.get_exam_info_by_ID("578a44ff71ed097fc3079d6e", function (result) { + if (result.length == 0) { + console.log("some error occured"); + } + else { + console.log(result); + } + });*/ + +// dbFile.add_user(["some as email", "some_user names", "kumar", "damani", "uofT", "cs", "some hashed passwd"]); + + +/* + dbFile.find_user("some Email", function (result) { + if (result == false) { + console.log("no such user found"); + } + else { + console.log("user already exists"); + } + });*/ + +/* dbFile.find_user_name("some_user name", function (result) { + if (result == false) { + console.log("no such user_name found"); + } + else { + console.log("user_name taken"); + } + });*/ - -dbFile.get_exam_info_by_ID("578a44ff71ed097fc3079d6e", function (result) { - if (result.length == 0) { - console.log("some error occured"); - } - else { - console.log(result); - } -});
\ No newline at end of file |
