restrict latest out view to project

master
Garrett Mills 5 years ago
parent 287cd0107d
commit 5aa89c308d

@ -203,7 +203,7 @@ class v1 {
return _flitter.error(res, 401, {reason: 'You do not have permission to view this project.'})
}
const out = await Out.findOne({}, {}, { sort: { 'created': -1 } })
const out = await Out.findOne({project_id: project.id}, {}, { sort: { 'created': -1 } })
if ( !out ){
return _flitter.error(res, 404, {reason: 'This project has no outputs yet.'})
}

Loading…
Cancel
Save