Skip to content

Commit

Permalink
fix: unable to rename freshly created theme (fehmer) (#5486)
Browse files Browse the repository at this point in the history
  • Loading branch information
fehmer authored Jun 12, 2024
1 parent 0715352 commit d5b3103
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions backend/src/api/controllers/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -657,9 +657,7 @@ export async function addCustomTheme(
const { name, colors } = req.body;

const addedTheme = await UserDAL.addTheme(uid, { name, colors });
return new MonkeyResponse("Custom theme added", {
theme: addedTheme,
});
return new MonkeyResponse("Custom theme added", addedTheme);
}

export async function removeCustomTheme(
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/ts/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ export async function addCustomTheme(

const newCustomTheme: MonkeyTypes.CustomTheme = {
...theme,
_id: response.data._id as string,
_id: response.data._id,
};

dbSnapshot.customThemes.push(newCustomTheme);
Expand Down

0 comments on commit d5b3103

Please sign in to comment.