Added test and query call
This commit is contained in:
@@ -4,8 +4,10 @@ const handleClearGroup = (req, res, db) => {
|
||||
//Parsing req body
|
||||
const { reqgroup} =req.body;
|
||||
//Checking for groupname in table groups and deleting users
|
||||
db('groups')
|
||||
db('groups')
|
||||
.where('groupname', 'ilike', reqgroup)
|
||||
//Group initialization is maintained
|
||||
.andWhereNot('username', '')
|
||||
.del()
|
||||
.then (count => {
|
||||
if (count!==0) {
|
||||
|
||||
Reference in New Issue
Block a user