Skip to content

Commit

Permalink
core: remove unneccecary if
Browse files Browse the repository at this point in the history
  • Loading branch information
edalholt committed Sep 29, 2023
1 parent 233fce3 commit 04b0ad0
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions backend/controllers/votation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,16 +142,12 @@ export async function createVotation(req: RequestWithNtnuiNo, res: Response) {

const group = req.body.group;
const title = req.body.title;
let voteText = req.body.voteText;
const voteText = req.body.voteText || "";
const caseNumber = req.body.caseNumber;
const options: [] = req.body.options;
const maximumOptions = req.body.maximumOptions || 1;
const user = await User.findById(req.ntnuiNo);

if (!voteText) {
voteText = "";
}

if (user) {
if (
user.groups.some(
Expand Down

0 comments on commit 04b0ad0

Please sign in to comment.