sopyb / NavigoLearnAPI

REST API of NavigoLearn
BSD 3-Clause "New" or "Revised" License
3 stars 3 forks source link

Fix null values in ExploreDB queries #59

Closed sopyb closed 1 year ago

sopyb commented 1 year ago

Made changes in ExploreDB.ts to handle null values in SQL queries, specifically in the counting of 'likeCount' and 'isLiked'. This is important to ensure data integrity and avoid runtime errors when these fields are not available.

Also, limited the 'isLiked' subquery to one result to prevent unnecessary data. As a debugging measure, console.log has been added to log the 'result'. This will help monitor the output of the queries, but should be removed in production.

galaxine-senpai commented 1 year ago

Null values still exist image