Skip to content

Commit

Permalink
Fix audit log
Browse files Browse the repository at this point in the history
  • Loading branch information
zensh committed Aug 28, 2023
1 parent e62dca1 commit 9ec940a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/api/authn.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,12 +183,12 @@ func (a *AuthN) Callback(ctx *gear.Context) error {
referrer = c.Value
}
go a.giveAward(conf.WithGlobalCtx(ctx), res.UID, referrer)
go a.blls.Logbase.Log(ctx, bll.LogActionSysCreateUser, 1, res.UID, res.UID, &bll.LogPayload{
a.blls.Logbase.Log(ctx, bll.LogActionSysCreateUser, 1, res.UID, res.UID, &bll.LogPayload{
Idp: util.Ptr(idp),
Sub: util.Ptr(input.Sub),
})
} else {
go a.blls.Logbase.Log(ctx, bll.LogActionUserLogin, 1, res.UID, res.UID, &bll.LogPayload{
a.blls.Logbase.Log(ctx, bll.LogActionUserLogin, 1, res.UID, res.UID, &bll.LogPayload{
Idp: util.Ptr(idp),
Sub: util.Ptr(input.Sub),
})
Expand Down
2 changes: 1 addition & 1 deletion src/api/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func (a *Session) Logout(ctx *gear.Context) error {
return gear.ErrInternalServerError.From(err)
}

go a.blls.Logbase.Log(ctx, bll.LogActionUserLogout, 1, *sess.UID, *sess.UID, nil)
a.blls.Logbase.Log(ctx, bll.LogActionUserLogout, 1, *sess.UID, *sess.UID, nil)

didCookie := &http.Cookie{
Name: a.cookie.NamePrefix + "_DID",
Expand Down

0 comments on commit 9ec940a

Please sign in to comment.