don't render deleted content
This commit is contained in:
parent
cfd3e25952
commit
90d329cfd8
1 changed files with 3 additions and 0 deletions
|
@ -122,6 +122,9 @@ const ContentHandler = (controller : DocumentAccessor) => async (ctx:Context, ne
|
|||
if (document == undefined){
|
||||
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);
|
||||
ctx.state['location'] = {
|
||||
path:path,
|
||||
|
|
Loading…
Add table
Reference in a new issue