Skip to content

Commit 1cf92c6

Browse files
authored
Merge pull request #20 from UnschooledGamer/remove/sqlite3
BREAKING CHANGE: update: migrate to better-sqlite3
2 parents f9f04f3 + 6b9dcad commit 1cf92c6

File tree

15 files changed

+168
-960
lines changed

15 files changed

+168
-960
lines changed

.prettierrc

Lines changed: 0 additions & 5 deletions
This file was deleted.

biome.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,17 @@
33
"vcs": { "enabled": false, "clientKind": "git", "useIgnoreFile": false },
44
"files": {
55
"ignoreUnknown": true,
6-
"includes": ["**", "!**/*.css", "!**/public/**/*", "!**/*.d.ts", "!**/.vscode/**/*", "!**/jsconfig.json", "!**/.babelrc", "!**/.hintrc"]
6+
"includes": [
7+
"**",
8+
"!**/data/*",
9+
"!**/*.css",
10+
"!**/public/**/*",
11+
"!**/*.d.ts",
12+
"!**/.vscode/**/*",
13+
"!**/jsconfig.json",
14+
"!**/.babelrc",
15+
"!**/.hintrc"
16+
]
717
},
818
"formatter": {
919
"enabled": true,

client/pages/plugin/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ function CommentsContainerAndForm({ plugin, listRef, user, id, userComment }) {
432432

433433
let $comment;
434434

435-
commentId = commentId || res.id;
435+
commentId = res.id;
436436
if (commentId) {
437437
userComment = await fetch(`/api/comment/${commentId}`).then((userRes) => userRes.json());
438438
$comment = tag.get(`#comment_${commentId}`);
@@ -469,6 +469,8 @@ function CommentsContainerAndForm({ plugin, listRef, user, id, userComment }) {
469469
try {
470470
const deleted = await deleteComment(commentId);
471471
if (!deleted) return;
472+
alert('SUCCESS', 'Comment deleted successfully');
473+
commentId = null;
472474
form.el.reset();
473475
for (const input of form.getAll('input[name=vote]')) {
474476
input.checked = false;

0 commit comments

Comments
 (0)