Skip to content

Commit

Permalink
added some stuff for the testing process
Browse files Browse the repository at this point in the history
Signed-off-by: Oleksander Piskun <[email protected]>
  • Loading branch information
oleksandr-nc committed Feb 14, 2025
1 parent d092dce commit db6f563
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ex_app/lib/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from typing import Annotated

from fastapi import Depends, FastAPI, Request, WebSocket
from fastapi.responses import HTMLResponse
from fastapi.responses import HTMLResponse, JSONResponse
from nc_py_api import NextcloudApp
from nc_py_api.ex_app import AppAPIAuthMiddleware, LogLvl, nc_app, run_app, set_handlers

Expand Down Expand Up @@ -77,9 +77,9 @@ async def public_get(request: Request):


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


@APP.get("/admin")
Expand Down

0 comments on commit db6f563

Please sign in to comment.