Skip to content

Commit

Permalink
v.0.0.22 [publish]
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
  • Loading branch information
bigcat88 committed Jul 5, 2023
1 parent a212a48 commit f31dd78
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

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

## [0.0.22 - 2023-07-05]

### Added

- `heartbeat` endpoint support for AppEcosystemV2.

## [0.0.21 - 2023-07-04]

### Added
Expand Down
7 changes: 6 additions & 1 deletion nc_py_api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
from .constants import ApiScope, LogLvl
from .exceptions import NextcloudException, check_error
from .files import FsNodeInfo
from .integration_fastapi import nc_app, set_enabled_handler, set_scopes
from .integration_fastapi import (
enable_heartbeat,
nc_app,
set_enabled_handler,
set_scopes,
)
from .nextcloud import Nextcloud, NextcloudApp
from .ui_files_actions_menu import UiActionFileInfo, UiFileActionHandlerInfo
2 changes: 1 addition & 1 deletion nc_py_api/_version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
""" Version of nc_py_api"""

__version__ = "0.0.21"
__version__ = "0.0.22"
6 changes: 6 additions & 0 deletions nc_py_api/integration_fastapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,9 @@ def enabled_handler(
):
r = callback(enabled, nc)
return JSONResponse(content={"error": r}, status_code=200)


def enable_heartbeat(fast_api_app: FastAPI):
@fast_api_app.get("/heartbeat")
def heartbeat_handler():
return JSONResponse(content={"status": "ok"}, status_code=200)

0 comments on commit f31dd78

Please sign in to comment.