Skip to content
This repository has been archived by the owner on Jan 20, 2024. It is now read-only.

Commit

Permalink
Expose information on whether signup is allowed on the server
Browse files Browse the repository at this point in the history
  • Loading branch information
tdemin committed Dec 26, 2019
1 parent 189d52a commit 9e2b7f6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions project_amber/handlers/const.py
Expand Up @@ -13,3 +13,4 @@
API_REMINDER = "reminder"
API_QUERY = "query"
API_VERSION = "version"
API_SIGNUP = "signup"
8 changes: 6 additions & 2 deletions project_amber/handlers/misc.py
@@ -1,8 +1,12 @@
from json import dumps

from project_amber.config import config
from project_amber.const import VERSION
from project_amber.handlers.const import API_VERSION
from project_amber.handlers.const import API_VERSION, API_SIGNUP

signup_allowed = False
if config["allow_signup"]: signup_allowed = True


def version():
return dumps({API_VERSION: VERSION})
return dumps({API_VERSION: VERSION, API_SIGNUP: signup_allowed})

0 comments on commit 9e2b7f6

Please sign in to comment.