Skip to content

Commit 323d6bb

Browse files
committed
added some stuff for the testing process
Signed-off-by: Oleksander Piskun <[email protected]>
1 parent d092dce commit 323d6bb

File tree

2 files changed

+3
-23
lines changed

2 files changed

+3
-23
lines changed

ex_app/lib/main.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from typing import Annotated
99

1010
from fastapi import Depends, FastAPI, Request, WebSocket
11-
from fastapi.responses import HTMLResponse
11+
from fastapi.responses import HTMLResponse, JSONResponse
1212
from nc_py_api import NextcloudApp
1313
from nc_py_api.ex_app import AppAPIAuthMiddleware, LogLvl, nc_app, run_app, set_handlers
1414

@@ -77,9 +77,9 @@ async def public_get(request: Request):
7777

7878

7979
@APP.get("/user")
80-
async def user_get(request: Request):
80+
async def user_get(request: Request, status: int = 200):
8181
print(f"user_get: {request.headers}", flush=True)
82-
return "Page for the registered users only!"
82+
return JSONResponse(content="Page for the registered users only!", status_code=status)
8383

8484

8585
@APP.get("/admin")

test.sh

-20
This file was deleted.

0 commit comments

Comments
 (0)