mirror of
https://github.com/pawelmalak/flame.git
synced 2026-03-10 06:23:11 +08:00
Fixed bug where user could create empty app or bookmark which was causing page to go blank
This commit is contained in:
@@ -109,10 +109,11 @@ export const editTheme =
|
||||
};
|
||||
|
||||
export const updateTheme =
|
||||
(theme: Theme) => async (dispatch: Dispatch<UpdateThemeAction>) => {
|
||||
(theme: Theme, originalName: string) =>
|
||||
async (dispatch: Dispatch<UpdateThemeAction>) => {
|
||||
try {
|
||||
const res = await axios.put<ApiResponse<Theme[]>>(
|
||||
`/api/themes/${theme.name}`,
|
||||
`/api/themes/${originalName}`,
|
||||
theme,
|
||||
{ headers: applyAuth() }
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user