don't render deleted content
This commit is contained in:
parent
cfd3e25952
commit
90d329cfd8
@ -122,6 +122,9 @@ const ContentHandler = (controller : DocumentAccessor) => async (ctx:Context, ne
|
|||||||
if (document == undefined){
|
if (document == undefined){
|
||||||
return sendError(404,"document does not exist.");
|
return sendError(404,"document does not exist.");
|
||||||
}
|
}
|
||||||
|
if(document.deleted_at !== null){
|
||||||
|
return sendError(404,"document has been removed.");
|
||||||
|
}
|
||||||
const path = join(document.basepath,document.filename);
|
const path = join(document.basepath,document.filename);
|
||||||
ctx.state['location'] = {
|
ctx.state['location'] = {
|
||||||
path:path,
|
path:path,
|
||||||
|
Loading…
Reference in New Issue
Block a user