Skip to content

Commit

Permalink
fix debugger
Browse files Browse the repository at this point in the history
  • Loading branch information
TuuKeZu committed Aug 16, 2024
1 parent 61ab47d commit eb67887
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions database/themes.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ const createTheme = (auth, preset) => {
const getDefaultTheme = (id) => {
return new Promise((resolve, reject) => {
const themes = ['light', 'dark'];
if (err) console.log([err, url]);


if (!themes.includes(id)) return reject({ err: "specified theme is not a a default theme", status: 400 })

MongoClient.connect(url, (err, database) => {

MongoClient.connect(url, (err, database) => {
if (err) console.log([err, url]);
if (err) return reject({ err: 'Failed to connect to database', status: 500 });

const db = database.db('OtaWilma');
Expand Down

0 comments on commit eb67887

Please sign in to comment.