File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
assets/tatakform/colleges Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ class College {
21
21
22
22
try {
23
23
// Get all courses
24
- const colleges = await db . query < CollegeModel [ ] > ( `SELECT * FROM colleges` ) ;
24
+ const colleges = await db . query < CollegeModel [ ] > ( `SELECT * FROM colleges WHERE disabled = 0 ` ) ;
25
25
26
26
// If no results
27
27
if ( colleges . length === 0 ) {
@@ -61,7 +61,7 @@ class College {
61
61
62
62
try {
63
63
// Get college by acronym
64
- const college = await db . query < CollegeModel [ ] > ( `SELECT * FROM colleges WHERE acronym = ? LIMIT 1` , [ acronym ] ) ;
64
+ const college = await db . query < CollegeModel [ ] > ( `SELECT * FROM colleges WHERE disabled = 0 AND acronym = ? LIMIT 1` , [ acronym ] ) ;
65
65
66
66
// If no results
67
67
if ( college . length === 0 ) {
@@ -107,7 +107,7 @@ class College {
107
107
}
108
108
109
109
// Set the courses to the college
110
- const college = await db . query < CollegeModel [ ] > ( `SELECT * FROM colleges WHERE id = ? LIMIT 1` , [ courses [ 0 ] . college_id ] ) ;
110
+ const college = await db . query < CollegeModel [ ] > ( `SELECT * FROM colleges WHERE disabled = 0 AND id = ? LIMIT 1` , [ courses [ 0 ] . college_id ] ) ;
111
111
112
112
// If no results
113
113
if ( college . length === 0 ) {
You can’t perform that action at this time.
0 commit comments