Mave frontend data to base api root
Because many times we don't have a session
This commit is contained in:
parent
544ac78a3b
commit
839abcbd28
4 changed files with 20 additions and 11 deletions
|
|
@ -30,17 +30,11 @@ type organization struct {
|
|||
|
||||
type session struct {
|
||||
Impersonating *string `json:"impersonating"`
|
||||
Frontend sessionFrontend `json:"frontend"`
|
||||
NotificationCounts sessionNotificationCounts `json:"notification_counts"`
|
||||
Organization organization `json:"organization"`
|
||||
Self user `json:"self"`
|
||||
URLs sessionURL `json:"urls"`
|
||||
}
|
||||
type sessionFrontend struct {
|
||||
Environment string `json:"environment"`
|
||||
SentryDSN string `json:"sentry_dsn"`
|
||||
Version string `json:"version"`
|
||||
}
|
||||
type sessionNotificationCounts struct {
|
||||
Communications uint `json:"communication"`
|
||||
Home uint `json:"home"`
|
||||
|
|
@ -89,11 +83,6 @@ func (res *sessionR) Get(ctx context.Context, r *http.Request, user platform.Use
|
|||
}
|
||||
return &session{
|
||||
Impersonating: impersonating,
|
||||
Frontend: sessionFrontend{
|
||||
Environment: config.Environment,
|
||||
SentryDSN: config.SentryDSNFrontend,
|
||||
Version: version,
|
||||
},
|
||||
NotificationCounts: sessionNotificationCounts{
|
||||
Communications: counts.Communications,
|
||||
Home: counts.Home,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue