Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 2 additions & 12 deletions cmd/src/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,6 @@ fragment UserFields on User {
email
verified
}
usageStatistics {
lastActiveTime
lastActiveCodeHostIntegrationTime
}
url
}
`
Expand All @@ -76,21 +72,15 @@ type User struct {
Organizations struct {
Nodes []Org
}
Emails []UserEmail
UsageStatistics UserUsageStatistics
URL string
Emails []UserEmail
URL string
}

type UserEmail struct {
Email string
Verified bool
}

type UserUsageStatistics struct {
LastActiveTime string
LastActiveCodeHostIntegrationTime string
}

type SiteUser struct {
ID string
Username string
Expand Down
1 change: 1 addition & 0 deletions internal/users/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ func (c *Client) GraphQL(token, query string, variables map[string]any, target a
if err != nil {
return err
}
req.Header.Set("Content-Type", "application/json")
if token != "" {
req.Header.Set("Authorization", fmt.Sprintf("token %s", token))
} else {
Expand Down
Loading