Skip to content

Commit

Permalink
reverted theme from json to text/plain
Browse files Browse the repository at this point in the history
  • Loading branch information
danielfang97 committed Aug 23, 2024
1 parent e949563 commit 92988db
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions lib/views/admin/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,8 @@ function post (req, res) {
theme
.setCurrentThemeFromConfig()
.then(() => {
const responseContent = {
message: 'Theme updated successfully',
requestBody: req.body
}

if (!req.accepts('text/html')) {
return res.status(200).header('content-type', 'application/json').json(responseContent)
return res.status(200).header('content-type', 'text/plain').send('Theme updated successfully')
} else {
form(req, res)
}
Expand Down

0 comments on commit 92988db

Please sign in to comment.