fix: 500 server error when files.create request is closed by client (#5878)

This commit is contained in:
Tom Moor
2023-09-24 16:30:52 -04:00
committed by GitHub
parent 517f2634e3
commit 136ee0ad1d
4 changed files with 161 additions and 175 deletions

View File

@@ -41,7 +41,7 @@ router.post(
rejectOnEmpty: true,
});
if (attachment?.userId !== actor.id) {
if (attachment.userId !== actor.id) {
throw AuthorizationError("Invalid key");
}