Output host_name property on configuration API endpoint

pull/11118/head
Oliver Günther 2 years ago
parent 1ec1b729b8
commit 42b406b63d
No known key found for this signature in database
GPG Key ID: 88872239EB414F99
  1. 1
      docs/api/apiv3/components/schemas/configuration_model.yml
  2. 1
      docs/api/apiv3/tags/configuration.yml
  3. 4
      frontend/src/app/core/config/configuration.service.ts
  4. 6
      lib/api/v3/configuration/configuration_representer.rb

@ -19,6 +19,7 @@ example:
userPreferences:
href: "/api/v3/my_preferences"
maximumAttachmentFileSize: 5242880
hostName: 'example.com:8080'
perPageOptions:
- 1
- 10

@ -20,4 +20,5 @@ description: |-
| :-----------------------: | -------------------------------------------------- | ---------- | --------------------------------- | -------------------- |
| maximumAttachmentFileSize | The maximum allowed size of an attachment in Bytes | Integer | | READ |
| perPageOptions | Page size steps to be offered in paginated list UI | Integer[] | | READ |
| hostName | The host name configured for the system | String | | READ |
name: Configuration

@ -118,6 +118,10 @@ export class ConfigurationService {
return moment.localeData(I18n.locale).firstDayOfWeek();
}
public get hostName():string {
return this.systemPreference('hostName');
}
private loadConfiguration() {
return this
.apiV3Service

@ -73,6 +73,12 @@ module API
},
render_nil: true
property :host_name,
getter: ->(*) {
Setting.host_name
},
render_nil: true
property :user_preferences,
embedded: true,
exec_context: :decorator,

Loading…
Cancel
Save