Skip to content

Commit baed8fe

Browse files
committed
update
1 parent 20ca58d commit baed8fe

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

controllers/key.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ module.exports = {
1616

1717
async getAllEmptyKeysCount(ctx, next) {
1818
try {
19-
const data = await Key.findAllByEmail(null)
20-
ctx.body = { msg: 1001, data }
19+
const { count } = await Key.findAllByEmail(null)
20+
ctx.body = { msg: 1001, data: count }
2121
} catch (err) {
2222
ctx.body = { code: -1, msg: 1000, }
2323
}

src/App.vue

+3-3
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
</template>
6262

6363
<script>
64-
// import 'no-debugger'
64+
import 'no-debugger'
6565
import axios from 'axios'
6666
export default {
6767
name: 'App',
@@ -81,8 +81,8 @@ export default {
8181
handleAllEmptyKeysCount() {
8282
axios.get('/api/getAllEmptyKeysCount')
8383
.then((response) => {
84-
const { data: { data: { count } } } = response
85-
this.count = count
84+
const { data: { data } } = response
85+
this.count = data
8686
})
8787
},
8888
handleQuestion() {

0 commit comments

Comments
 (0)