Skip to content

Commit

Permalink
fix: query user without lastCheckIn
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelYuhe committed Dec 1, 2023
1 parent d293ffe commit d9a9843
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.DS_Store
.idea/
.vscode/
.env

# test && mocks
mocks/
Expand All @@ -9,4 +10,4 @@ mocks/
zeabur

# dist
dist/
dist/
4 changes: 2 additions & 2 deletions pkg/auth/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ const (
ZeaburOAuthAuthorizeURL = ZeaburOAuthServerURL + "/authorize"
ZeaburOAuthTokenURL = ZeaburOAuthServerURL + "/token"

ZeaburOAuthCLIClientID = "64c7559d0e6da9ed35dee1ff"
ZeaburOAuthCLIClientSecret = "630641"
ZeaburOAuthCLIClientID = "c92dcff3-92a1-4d39-827e-a3eb952d5e0b"
ZeaburOAuthCLIClientSecret = "tI2Q32jf"

OAuthLocalServerCallbackURL = "http://localhost/callback"
)
6 changes: 2 additions & 4 deletions pkg/model/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ type User struct {
BannedAt *time.Time `json:"bannedAt" graphql:"bannedAt"`
//BannedReason *BannedReasonType `json:"bannedReason" graphql:"bannedReason"`
//EmailPreference map[string]bool `json:"emailPreference" graphql:"emailPreference"`
AgreedAt *time.Time `json:"agreedAt" graphql:"agreedAt"`
LastCheckedInAt *time.Time `json:"lastCheckedInAt" graphql:"lastCheckedInAt"`
AgreedAt *time.Time `json:"agreedAt" graphql:"agreedAt"`
// DiscordID is the user's Discord ID.
DiscordID *string `json:"discordID" graphql:"discordID"`
ID string `json:"_id" graphql:"_id"`
Expand All @@ -37,7 +36,7 @@ type User struct {
}

func (u *User) Header() []string {
return []string{"ID", "Name", "Username", "Email", "Language", "LastCheckInAt", "RegisteredAt"}
return []string{"ID", "Name", "Username", "Email", "Language", "RegisteredAt"}
}

func (u *User) Rows() [][]string {
Expand All @@ -47,7 +46,6 @@ func (u *User) Rows() [][]string {
row = append(row, u.Username)
row = append(row, u.Email)
row = append(row, u.Language)
row = append(row, u.LastCheckedInAt.Format(time.RFC3339))
row = append(row, u.CreatedAt.Format(time.RFC3339))

return [][]string{row}
Expand Down

0 comments on commit d9a9843

Please sign in to comment.