Skip to content

Commit f31dd78

Browse files
committed
v.0.0.22 [publish]
Signed-off-by: Alexander Piskun <[email protected]>
1 parent a212a48 commit f31dd78

File tree

4 files changed

+19
-2
lines changed

4 files changed

+19
-2
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [0.0.22 - 2023-07-05]
6+
7+
### Added
8+
9+
- `heartbeat` endpoint support for AppEcosystemV2.
10+
511
## [0.0.21 - 2023-07-04]
612

713
### Added

nc_py_api/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
from .constants import ApiScope, LogLvl
66
from .exceptions import NextcloudException, check_error
77
from .files import FsNodeInfo
8-
from .integration_fastapi import nc_app, set_enabled_handler, set_scopes
8+
from .integration_fastapi import (
9+
enable_heartbeat,
10+
nc_app,
11+
set_enabled_handler,
12+
set_scopes,
13+
)
914
from .nextcloud import Nextcloud, NextcloudApp
1015
from .ui_files_actions_menu import UiActionFileInfo, UiFileActionHandlerInfo

nc_py_api/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
""" Version of nc_py_api"""
22

3-
__version__ = "0.0.21"
3+
__version__ = "0.0.22"

nc_py_api/integration_fastapi.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,9 @@ def enabled_handler(
3737
):
3838
r = callback(enabled, nc)
3939
return JSONResponse(content={"error": r}, status_code=200)
40+
41+
42+
def enable_heartbeat(fast_api_app: FastAPI):
43+
@fast_api_app.get("/heartbeat")
44+
def heartbeat_handler():
45+
return JSONResponse(content={"status": "ok"}, status_code=200)

0 commit comments

Comments
 (0)