Skip to content

Commit

Permalink
Merge pull request #64 from AlexSciFier/fix-add-bookmark
Browse files Browse the repository at this point in the history
fix: Assignment to constant variable #63
  • Loading branch information
AlexSciFier authored Aug 24, 2023
2 parents 3b0d505 + fd8beb1 commit e4c20b6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions server/db/sqlite/stores/bookmarks.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ export default class BookmarksStore {
: ""
}`;

const selectParams = {
let selectParams = {
userId,
};

const conditions = [];
let conditions = [];

if (search || tag || category) {
if (search) {
Expand Down Expand Up @@ -127,7 +127,7 @@ export default class BookmarksStore {
: ""
}`;

const countParams = { userId };
let countParams = { userId };

let selectQuery = `SELECT
bookmarks.id,
Expand All @@ -146,9 +146,9 @@ export default class BookmarksStore {
: ""
}`;

const selectParams = { userId, search, limit, offset };
let selectParams = { userId, search, limit, offset };

const conditions = [];
let conditions = [];

if (userId) {
conditions.push("(bookmarks.userId IN (:userId, 0) OR bookmarks.userId IS NULL)");
Expand Down Expand Up @@ -247,7 +247,7 @@ export default class BookmarksStore {
}

getItemByUrl(userId, url) {
const selectQuery = `SELECT * FROM bookmarks WHERE url = :url`;
let selectQuery = `SELECT * FROM bookmarks WHERE url = :url`;
let selectParams = {url}
if(userId){
selectQuery += " AND (userId IN (:userId, 0) OR userId IS NULL)"
Expand Down

0 comments on commit e4c20b6

Please sign in to comment.