Skip to content
Snippets Groups Projects
Commit b0b9289b authored by Sebastian Mihalache's avatar Sebastian Mihalache
Browse files

feat(component-manuscript-manager): add authsome and fix patch response

parent aa9f43fa
No related branches found
No related tags found
1 merge request!8Sprint #10
......@@ -21,7 +21,7 @@ module.exports = models => async (req, res) => {
Object.assign(recommendation, req.body)
recommendation.updatedOn = Date.now()
await fragment.save()
return res.status(200).json({ recommendation })
return res.status(200).json(recommendation)
} catch (e) {
const notFoundError = await helpers.handleNotFoundError(e, 'Item')
return res.status(notFoundError.status).json({
......
......@@ -39,6 +39,9 @@ const filterObjectData = (
if (matchingCollPerm === undefined) return null
if (['reviewer'].includes(matchingCollPerm.permission)) {
object.files = omit(object.files, ['coverLetter'])
object.recommendations = object.recommendations.filter(
rec => rec.userId === user.id,
)
}
return object
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment