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
9ccedbe4
Commit
9ccedbe4
authored
Oct 20, 2021
by
wty
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
后端代码错误处理更新5
parent
0a885662
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
users.js
server/routes/users.js
+2
-2
No files found.
server/routes/users.js
View file @
9ccedbe4
...
@@ -32,7 +32,7 @@ router.get('/getUser', function (req, res, next) {
...
@@ -32,7 +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
:
{
...
@@ -53,7 +53,7 @@ router.get('/login', (req, res) => {
...
@@ -53,7 +53,7 @@ router.get('/login', (req, res) => {
})
})
throw
err
throw
err
}
}
if
(
!!
result
&&
result
[
0
]
?
.
uid
)
{
if
(
!!
result
&&
result
[
0
].
uid
)
{
res
.
cookie
(
'uid'
,
result
[
0
].
uid
)
res
.
cookie
(
'uid'
,
result
[
0
].
uid
)
res
.
send
({
res
.
send
({
success
:
true
,
success
:
true
,
...
...
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