-
Notifications
You must be signed in to change notification settings - Fork 457
Expand file tree
/
Copy pathversion_controller.rb
More file actions
41 lines (38 loc) 路 887 Bytes
/
Copy pathversion_controller.rb
File metadata and controls
41 lines (38 loc) 路 887 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# frozen_string_literal: true
class Api::V2::VersionController < Api::BaseController
def show
render json: {
application_version: Version.current.to_s,
api_version: "2.1",
edition: "oss",
features: features
}
end
private
def features
{
anonymous_access: Settings.allow_anonymous,
api_token_authentication: true,
accounts: {
enabled: false
},
pushes: {
enabled: true,
email_auto_dispatch: Settings.notify_by_email_available?,
file_attachments: {
enabled: Settings.enable_file_pushes,
requires_authentication: true
},
url_pushes: {
enabled: Settings.enable_url_pushes
},
qr_code_pushes: {
enabled: Settings.enable_qr_pushes
}
},
requests: {
enabled: false
}
}
end
end