= schedule page added;
+ clients dir for browser code; + some models (course); = other (main style, etc);
This commit is contained in:
1 parent
c1e160d779
commit
8784043f1d
12 files changed
+285
-81
No files matched your search
@@ -0,0 +1,21 @@
|
||||
const COURSES = require("./courses.json");
|
||||
|
||||
exports.courses = COURSES;
|
||||
exports.course = getCourseByID;
|
||||
exports.name = getCourseNameByID;
|
||||
|
||||
function getCourseByID(id){
|
||||
for(var i=0; i<COURSES.length; i++){
|
||||
var p = COURSES[i];
|
||||
if(p.id == id){
|
||||
return p;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function getCourseNameByID(id){
|
||||
var p = getCourseByID(id);
|
||||
if(p) return p.name;
|
||||
else return null;
|
||||
}
|
||||
Reference in new issue
Block a user