Skip to content

Commit

Permalink
fix(web): fix bugs(reruin#723,reruin#747)
Browse files Browse the repository at this point in the history
  • Loading branch information
reruin committed Dec 27, 2021
1 parent ece4618 commit 10d2550
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/sharelist-web/src/hooks/useSetting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export const useSetting: IUseSetting = (): any => {
if (resp.status) {
message.error(resp.msg)
} else {
saveFile(JSON.stringify(resp), 'config.json')
saveFile(JSON.stringify(resp.data), 'config.json')
}
})
}
Expand Down
4 changes: 4 additions & 0 deletions packages/sharelist/app/controller/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ module.exports = {
async setting(ctx, next) {
ctx.body = { data: getConfig(this.app, !!ctx.query.raw) }
},
async config(ctx, next) {
const data = getConfig(this.app, !!ctx.query.raw)
ctx.body = { status: 0, data: { title: data.title } }
},
async reload(ctx, next) {
await this.app.sharelist.reload()
ctx.body = { status: 0 }
Expand Down

0 comments on commit 10d2550

Please sign in to comment.