Skip to content

Commit

Permalink
fix(app): reduce func by 1 line for sonarcloud
Browse files Browse the repository at this point in the history
  • Loading branch information
Demwunz committed May 15, 2024
1 parent 0d5fa03 commit 355386a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ const SessionModel = require('../../models/session.model.js')
*/
async function go (sessionId, payload, yar) {
const session = await SessionModel.query().findById(sessionId)
const options = _ensureIsArray(payload['additional-submission-options'])
payload['additional-submission-options'] = options
// Ensure 'additional-submission-options' is an array and assign it to options
const options = payload['additional-submission-options'] = _ensureIsArray(payload['additional-submission-options'])
const validationResult = _validate(payload)

if (!validationResult) {
Expand Down

0 comments on commit 355386a

Please sign in to comment.