sharing/cosmetics and not supported
This commit is contained in:
@@ -414,7 +414,7 @@ class BaseSharing:
|
|||||||
Status in JSON/TEXT (TEXT can be parsed by shell)
|
Status in JSON/TEXT (TEXT can be parsed by shell)
|
||||||
|
|
||||||
"""
|
"""
|
||||||
if not self.sharing_collection_by_map and not self.sharing_collection_by_token:
|
if not self._enabled:
|
||||||
# API is not enabled
|
# API is not enabled
|
||||||
return httputils.NOT_FOUND
|
return httputils.NOT_FOUND
|
||||||
|
|
||||||
@@ -426,7 +426,7 @@ class BaseSharing:
|
|||||||
if not path.startswith("/.sharing/v1/"):
|
if not path.startswith("/.sharing/v1/"):
|
||||||
return httputils.NOT_FOUND
|
return httputils.NOT_FOUND
|
||||||
|
|
||||||
# split into ShareType and action or "info"
|
# split into ShareType and action
|
||||||
ShareType_action = path.removeprefix("/.sharing/v1/")
|
ShareType_action = path.removeprefix("/.sharing/v1/")
|
||||||
match = re.search('([a-z]+)/([a-z]+)$', ShareType_action)
|
match = re.search('([a-z]+)/([a-z]+)$', ShareType_action)
|
||||||
if not match:
|
if not match:
|
||||||
@@ -634,6 +634,11 @@ class BaseSharing:
|
|||||||
answer['ApiVersion'] = 1
|
answer['ApiVersion'] = 1
|
||||||
Timestamp = int((datetime.now() - datetime(1970, 1, 1)).total_seconds())
|
Timestamp = int((datetime.now() - datetime(1970, 1, 1)).total_seconds())
|
||||||
|
|
||||||
|
if not self.sharing_collection_by_map and not self.sharing_collection_by_token:
|
||||||
|
if not action == 'info':
|
||||||
|
# API is not enabled
|
||||||
|
return httputils.NOT_FOUND
|
||||||
|
|
||||||
# action: list
|
# action: list
|
||||||
if action == "list":
|
if action == "list":
|
||||||
if logger.isEnabledFor(logging.DEBUG):
|
if logger.isEnabledFor(logging.DEBUG):
|
||||||
|
|||||||
Reference in New Issue
Block a user