This repository has been archived by the owner on Jan 20, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expose information on whether signup is allowed on the server
- Loading branch information
Showing
2 changed files
with
7 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,3 +13,4 @@ | |
API_REMINDER = "reminder" | ||
API_QUERY = "query" | ||
API_VERSION = "version" | ||
API_SIGNUP = "signup" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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}) |