diff --git a/api/user.go b/api/user.go index 688fa5e4..5077baa1 100644 --- a/api/user.go +++ b/api/user.go @@ -9,8 +9,12 @@ import ( "github.com/Gleipnir-Technology/nidus-sync/platform" ) +type contentURLAPI struct { + Communication string `json:"api"` +} type contentURLs struct { - Tegola string `json:"tegola"` + API contentURLAPI `json:"api"` + Tegola string `json:"tegola"` } type contentUserSelf struct { Self platform.User `json:"self"` @@ -27,6 +31,9 @@ func getUserSelf(ctx context.Context, r *http.Request, user platform.User, query return &contentUserSelf{ Self: user, URLs: contentURLs{ + API: contentURLAPI{ + Communication: urls.API.Communication, + }, Tegola: urls.Tegola, }, }, nil diff --git a/html/url.go b/html/url.go index 140dee04..05f54a07 100644 --- a/html/url.go +++ b/html/url.go @@ -7,6 +7,7 @@ import ( ) type ContentURL struct { + API contentURLAPI Configuration contentURLConfiguration OAuthRefreshArcGIS string RMO contentURLRMO @@ -19,6 +20,7 @@ type ContentURL struct { func NewContentURL() ContentURL { return ContentURL{ + API: newContentURLAPI(), Configuration: newContentURLConfiguration(), OAuthRefreshArcGIS: config.MakeURLNidus("/arcgis/oauth/begin"), RMO: newContentURLRMO(), @@ -30,6 +32,16 @@ func NewContentURL() ContentURL { } } +type contentURLAPI struct { + Communication string +} + +func newContentURLAPI() contentURLAPI { + return contentURLAPI{ + Communication: config.MakeURLNidus("/api/communication"), + } +} + type contentURLConfiguration struct { ArcGIS string Fieldseeker string