mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 21:27:42 +00:00
fix: correct method and path for session api activity (#6880)
* fix: correct method and path for session api activity * fix: correct method and path for session api activity * fix: correct function name for activity trigger
This commit is contained in:
@@ -2,6 +2,8 @@ package info
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"google.golang.org/grpc/codes"
|
||||
)
|
||||
|
||||
type activityInfoKey struct{}
|
||||
@@ -10,6 +12,8 @@ type ActivityInfo struct {
|
||||
Method string
|
||||
Path string
|
||||
RequestMethod string
|
||||
GRPCStatus codes.Code
|
||||
HTTPStatus int
|
||||
}
|
||||
|
||||
func (a *ActivityInfo) IntoContext(ctx context.Context) context.Context {
|
||||
@@ -32,6 +36,7 @@ func (a *ActivityInfo) SetMethod(method string) *ActivityInfo {
|
||||
a.Method = method
|
||||
return a
|
||||
}
|
||||
|
||||
func (a *ActivityInfo) SetPath(path string) *ActivityInfo {
|
||||
a.Path = path
|
||||
return a
|
||||
@@ -41,3 +46,13 @@ func (a *ActivityInfo) SetRequestMethod(method string) *ActivityInfo {
|
||||
a.RequestMethod = method
|
||||
return a
|
||||
}
|
||||
|
||||
func (a *ActivityInfo) SetGRPCStatus(status codes.Code) *ActivityInfo {
|
||||
a.GRPCStatus = status
|
||||
return a
|
||||
}
|
||||
|
||||
func (a *ActivityInfo) SetHTTPStatus(status int) *ActivityInfo {
|
||||
a.HTTPStatus = status
|
||||
return a
|
||||
}
|
||||
|
Reference in New Issue
Block a user