Skip to content

Commit

Permalink
[fix] #101
Browse files Browse the repository at this point in the history
  • Loading branch information
yoneyan committed Jul 22, 2021
1 parent 6484683 commit dc89619
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions pkg/api/core/group/info/v0/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,16 @@ func Get(c *gin.Context) {
}

if !*tmpTicket.Request {
var groupIDTicket uint = 0
if tmpTicket.GroupID != nil {
groupIDTicket = *tmpTicket.GroupID
}

// Ticket
resultTicket = append(resultTicket, info.Ticket{
ID: tmpTicket.ID,
CreatedAt: tmpTicket.CreatedAt,
GroupID: *tmpTicket.GroupID,
GroupID: groupIDTicket,
UserID: *tmpTicket.UserID,
Chat: resultChat,
Solved: tmpTicket.Solved,
Expand Down Expand Up @@ -205,15 +210,11 @@ func Get(c *gin.Context) {
Data: tmpChat.Data,
})
}
groupID = 0
if authResult.User.GroupID != nil {
groupID = *authResult.User.GroupID
}

resultTicket = append(resultTicket, info.Ticket{
ID: tmpTicket.ID,
CreatedAt: tmpTicket.CreatedAt,
GroupID: groupID,
GroupID: 0,
UserID: authResult.User.ID,
Chat: resultChat,
Solved: tmpTicket.Solved,
Expand Down

0 comments on commit dc89619

Please sign in to comment.