Skip to content

Commit

Permalink
pr feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolk committed Jan 3, 2024
1 parent b77d567 commit 9379872
Showing 1 changed file with 4 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,7 @@ app.get('/getUser', async (req, res, next) => {

app.get('/listUsers', async (req, res, next) => {
try {
let limit = 25;
if (req.query.limit) {
limit = parseInt(req.query.limit);
}
const limit = req.query.limit ? parseInt(req.query.limit) : 25;
const response = await listUsers(limit, req.query.token);
res.status(200).json(response);
} catch (err) {
Expand All @@ -175,10 +172,7 @@ app.get('/listUsers', async (req, res, next) => {

app.get('/listGroups', async (req, res, next) => {
try {
let limit = 25;
if (req.query.limit) {
limit = parseInt(req.query.limit);
}
const limit = req.query.limit ? parseInt(req.query.limit) : 25;
const response = await listGroups(limit, req.query.token);
res.status(200).json(response);
} catch (err) {
Expand All @@ -194,10 +188,7 @@ app.get('/listGroupsForUser', async (req, res, next) => {
}

try {
let limit = 25;
if (req.query.limit) {
limit = parseInt(req.query.limit);
}
const limit = req.query.limit ? parseInt(req.query.limit) : 25;
const response = await listGroupsForUser(req.query.username, limit, req.query.token);
res.status(200).json(response);
} catch (err) {
Expand All @@ -213,10 +204,7 @@ app.get('/listUsersInGroup', async (req, res, next) => {
}

try {
let limit = 25;
if (req.query.limit) {
limit = parseInt(req.query.limit);
}
const limit = req.query.limit ? parseInt(req.query.limit) : 25;
const response = await listUsersInGroup(req.query.groupname, limit, req.query.token);
res.status(200).json(response);
} catch (err) {
Expand Down

0 comments on commit 9379872

Please sign in to comment.