Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hilo-user
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenweijian
hilo-user
Commits
a829b62a
Commit
a829b62a
authored
Jul 26, 2023
by
chenweijian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
接口优化
parent
3b73212b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
router.go
route/router.go
+1
-1
user.go
route/user_r/user.go
+3
-3
No files found.
route/router.go
View file @
a829b62a
...
...
@@ -32,7 +32,7 @@ func InitRouter() *gin.Engine {
user
.
GET
(
"/bag/:resType"
,
wrapper
(
user_r
.
UserBag
))
user
.
GET
(
"/detail"
,
EncryptHandle
,
wrapper
(
user_r
.
UserDetail
))
user
.
GET
(
"/detail/:userExternalId"
,
EncryptHandle
,
wrapper
(
user_r
.
UserDetailByExternalId
))
user
.
GET
(
"/detail/room
/:userExternalId
"
,
EncryptHandle
,
wrapper
(
user_r
.
GetUserDetailInRoom
))
user
.
GET
(
"/detail/room"
,
EncryptHandle
,
wrapper
(
user_r
.
GetUserDetailInRoom
))
}
cp
:=
v2
.
Group
(
"/cp"
)
{
...
...
route/user_r/user.go
View file @
a829b62a
...
...
@@ -110,17 +110,17 @@ func UserDetailByExternalId(c *gin.Context) (*mycontext.MyContext, error) {
// @Tags 用户
// @Summary 房间内获取用户信息
// @Param userExternalId
path
string true "userExternalId"
// @Param userExternalId
query
string true "userExternalId"
// @Param groupId query string false "群组id,当传了该id,则返回该用户在该群组的身份"
// @Success 200 {object} user_cv.CvUserDetail
// @Router /v1/user/detail/room
/{userExternalId}
[get]
// @Router /v1/user/detail/room [get]
func
GetUserDetailInRoom
(
c
*
gin
.
Context
)
(
*
mycontext
.
MyContext
,
error
)
{
myContext
:=
mycontext
.
CreateMyContext
(
c
.
Keys
)
userId
,
lang
,
err
:=
req
.
GetUserIdLang
(
c
,
myContext
)
if
err
!=
nil
{
return
myContext
,
err
}
otherUserId
,
err
:=
req
.
ToUserId
(
myContext
,
mysql
.
Str
(
c
.
Param
(
"userExternalId"
)
))
otherUserId
,
err
:=
req
.
ToUserId
(
myContext
,
c
.
Query
(
"userExternalId"
))
if
err
!=
nil
{
return
nil
,
err
}
...
...
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