Add /api/v1/stats

This commit is contained in:
Omar Roth 2019-03-01 19:25:16 -06:00
parent 0eaf8f38a1
commit 4be82c5ca6
3 changed files with 55 additions and 5 deletions

View file

@ -22,6 +22,7 @@ user: String,
captcha_enabled: {type: Bool, default: true},
login_enabled: {type: Bool, default: true},
registration_enabled: {type: Bool, default: true},
statistics_enabled: {type: Bool, default: false},
admins: {type: Array(String), default: [] of String},
})
end

View file

@ -189,6 +189,11 @@ function update_value(element) {
<label for="registration_enabled"><%= translate(locale, "Registration enabled? ") %></label>
<input name="registration_enabled" id="registration_enabled" type="checkbox" <% if config.registration_enabled %>checked<% end %>>
</div>
<div class="pure-control-group">
<label for="statistics_enabled"><%= translate(locale, "Report statistics? ") %></label>
<input name="statistics_enabled" id="statistics_enabled" type="checkbox" <% if config.statistics_enabled %>checked<% end %>>
</div>
<% end %>
<% if env.get? "user" %>