Skip to content

Commit

Permalink
🐛 => fix notebook edit
Browse files Browse the repository at this point in the history
  • Loading branch information
qridwan committed Sep 29, 2024
1 parent 91ba7cf commit e19dcbd
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 28 deletions.
Binary file modified .DS_Store
Binary file not shown.
36 changes: 18 additions & 18 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
{
"workbench.colorCustomizations": {
"activityBar.activeBackground": "#fa1b49",
"activityBar.background": "#fa1b49",
"activityBar.foreground": "#e7e7e7",
"activityBar.inactiveForeground": "#e7e7e799",
"activityBarBadge.background": "#155e02",
"activityBarBadge.foreground": "#e7e7e7",
"commandCenter.border": "#e7e7e799",
"sash.hoverBorder": "#fa1b49",
"statusBar.background": "#dd0531",
"statusBar.foreground": "#e7e7e7",
"statusBarItem.hoverBackground": "#fa1b49",
"statusBarItem.remoteBackground": "#dd0531",
"statusBarItem.remoteForeground": "#e7e7e7",
"titleBar.activeBackground": "#dd0531",
"titleBar.activeForeground": "#e7e7e7",
"titleBar.inactiveBackground": "#dd053199",
"titleBar.inactiveForeground": "#e7e7e799"
},
"activityBar.activeBackground": "#fa1b49",
"activityBar.background": "#fa1b49",
"activityBar.foreground": "#e7e7e7",
"activityBar.inactiveForeground": "#e7e7e799",
"activityBarBadge.background": "#155e02",
"activityBarBadge.foreground": "#e7e7e7",
"commandCenter.border": "#e7e7e799",
"sash.hoverBorder": "#fa1b49",
"statusBar.background": "#dd0531",
"statusBar.foreground": "#e7e7e7",
"statusBarItem.hoverBackground": "#fa1b49",
"statusBarItem.remoteBackground": "#dd0531",
"statusBarItem.remoteForeground": "#e7e7e7",
"titleBar.activeBackground": "#dd0531",
"titleBar.activeForeground": "#e7e7e7",
"titleBar.inactiveBackground": "#dd053199",
"titleBar.inactiveForeground": "#e7e7e799"
},
"peacock.color": "#dd0531"
}
2 changes: 1 addition & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion dist/notebook/domain/repo.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/notebook/domain/repo.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ app.use("/api/tags/", Middlewares.validateJWT, tags); //Tags
app.use("/api/category/", Middlewares.validateJWT, categories); //Categories
app.use("/api/notebooks/", Middlewares.validateJWT, notebooks); //Notebooks / Folder
app.use("/api/trash/", Middlewares.validateJWT, trash); //Trash box
app.get("/db-ping", (req, res) => {
app.get("/api/db-ping", (req, res) => {
client
.select("*")
.from("notes")
Expand Down
9 changes: 4 additions & 5 deletions src/notebook/domain/repo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,10 @@ const edit = async (notebook: notebookType) => {
}

// Update the notebook with the new data.
await client.raw("update notebooks set name = ?, user_id = ? where id = ?", [
notebook.name,
notebook.user_id,
notebookId,
]);
await client.raw(
"update notebooks set name = ?, user_id = ?, icon = ? where id = ?",
[notebook.name, notebook.user_id, notebook.icon, notebookId]
);

// Fetch and return the updated notebook.
const updatednotebook = await client.raw(
Expand Down

0 comments on commit e19dcbd

Please sign in to comment.