utat-ss / tree-visualizer

An interactive requirements engineering tool
1 stars 0 forks source link

Investigate restructuring of backend Notion service to comply with DI pattern #10

Open jdtech3 opened 1 year ago

jdtech3 commented 1 year ago

I see, we can revisit this at a later point to find a way to structure this code so it complies with DI without needing to duplicate code. Closing these as resolved

_Originally posted by @DM1122 in https://github.com/utat-ss/tree-visualizer/pull/9#discussion_r1157630320_

- const _getNotionDB = async function(database_id, notion_client = undefined) {
-  if (notion_client === undefined) notion_client = newNotionClient();

+ const _getNotionDB = async function(database_id, notion_client) {

(server/src/services/notion.service.js)