-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0b9393b
commit de0af28
Showing
19 changed files
with
19 additions
and
348 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 |
---|---|---|
@@ -1,32 +1,12 @@ | ||
from starlette.endpoints import HTTPEndpoint | ||
from starlette.responses import JSONResponse | ||
from starlette import status | ||
from fastapi import Request | ||
|
||
from config_handler import ( | ||
base_config_json, | ||
full_config_json, | ||
get_config_value, | ||
) | ||
|
||
|
||
class IsManagedRest(HTTPEndpoint): | ||
def get(self, request) -> JSONResponse: | ||
is_managed = get_config_value("is_managed") | ||
return JSONResponse(is_managed, status_code=status.HTTP_200_OK) | ||
|
||
|
||
class IsDemoRest(HTTPEndpoint): | ||
def get(self, request) -> JSONResponse: | ||
is_managed = get_config_value("is_demo") | ||
return JSONResponse(is_managed, status_code=status.HTTP_200_OK) | ||
|
||
|
||
class FullConfigRest(HTTPEndpoint): | ||
def get(self, request: Request) -> JSONResponse: | ||
return full_config_json() | ||
|
||
|
||
class BaseConfigRest(HTTPEndpoint): | ||
def get(self, request: Request) -> JSONResponse: | ||
return base_config_json() |
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
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
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,14 +1,8 @@ | ||
{ | ||
"is_managed": null, | ||
"is_demo": null, | ||
"allow_data_tracking": true, | ||
"s3_region": null, | ||
"KERN_S3_ENDPOINT": null, | ||
"spacy_downloads": [ | ||
"en_core_web_sm", | ||
"de_core_news_sm" | ||
], | ||
"tokens": { | ||
"INTERCOM": "" | ||
}, | ||
"KERN_S3_ENDPOINT": null | ||
] | ||
} |
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
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
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
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
This file was deleted.
Oops, something went wrong.
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
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
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
Oops, something went wrong.