fix: unable to rename freshly created theme (fehmer) (#5486)

This commit is contained in:
Christian Fehmer 2024-06-12 10:24:52 +02:00 committed by GitHub
parent 0715352c5a
commit d5b3103967
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 4 deletions

View file

@ -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(

View file

@ -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);