Skip to content

Commit

Permalink
Changes for Draft courses
Browse files Browse the repository at this point in the history
  • Loading branch information
Sahil-tarento authored Mar 20, 2024
1 parent 2cc2fe2 commit a006a7a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/service/contentService.js
Original file line number Diff line number Diff line change
Expand Up @@ -994,14 +994,16 @@ function retireContentAPI (req, response) {
function (res, CBW) {
var createdByOfContents = _.uniq(_.pluck(res.result.content, 'createdBy'))
if (createdByOfContents.length === 1 && createdByOfContents[0] === userId) {
CBW()
CBW(null, res)
} else {
rspObj.errCode = reqMsg.TOKEN.INVALID_CODE
rspObj.errMsg = reqMsg.TOKEN.INVALID_MESSAGE
rspObj.responseCode = responseCode.UNAUTHORIZED_ACCESS
return response.status(401).send(respUtil.errorResponse(rspObj))
}
},

function (res, CBW) {
var status = _.uniq(_.pluck(res.result.content, 'status'))
if (status.length === 1 && status[0] === 'Draft') {
CBW()
Expand Down

0 comments on commit a006a7a

Please sign in to comment.