Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
Dui123
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
王天宇
Dui123
Commits
30ba49a4
Commit
30ba49a4
authored
Oct 20, 2021
by
wty
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
后端代码错误处理更新1
parent
725350d2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
5 deletions
+1
-5
users.js
server/routes/users.js
+1
-5
No files found.
server/routes/users.js
View file @
30ba49a4
...
@@ -23,7 +23,7 @@ router.get('/getUser', function (req, res, next) {
...
@@ -23,7 +23,7 @@ router.get('/getUser', function (req, res, next) {
// }
// }
const
SQL
=
'SELECT * FROM `user` WHERE `user`.uid = ?'
const
SQL
=
'SELECT * FROM `user` WHERE `user`.uid = ?'
Mysql
.
query
(
SQL
,
[
uid
],
(
err
,
result
)
=>
{
Mysql
.
query
(
SQL
,
[
uid
],
(
err
,
result
)
=>
{
if
(
err
)
{
if
(
err
||
!
result
)
{
res
.
send
({
res
.
send
({
success
:
false
,
success
:
false
,
err
err
...
@@ -32,11 +32,7 @@ router.get('/getUser', function (req, res, next) {
...
@@ -32,11 +32,7 @@ router.get('/getUser', function (req, res, next) {
}
}
console
.
log
(
result
)
console
.
log
(
result
)
const
_result
=
result
.
slice
()
const
_result
=
result
.
slice
()
_result
[
0
]?.
follow
=
JSON
.
parse
(
_result
[
0
].
follow
)
_result
[
0
]?.
follow
=
JSON
.
parse
(
_result
[
0
].
follow
)
res
.
send
({
res
.
send
({
success
:
true
,
success
:
true
,
data
:
{
data
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment