Skip to content

Commit

Permalink
Update DocumentsManager.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Smaug6739 authored Mar 12, 2024
1 parent 93b1907 commit a6c5587
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion backend/classes/DocumentsManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ export default class DocumentsManager extends Base {
this.app.db.query<DocumentDB[]>(
`SELECT * FROM documents ${all == 'true' ? '' : 'WHERE `accessibility` = 1'} ORDER BY \`name\``,
(err, result) => {
if (err) return reject('Internal database error.');
if (err) {
console.log(err);
return reject('Internal database error.');
}
resolve(result);
},
);
Expand Down

0 comments on commit a6c5587

Please sign in to comment.