Compare commits

..

3 Commits

Author SHA1 Message Date
e07a74384f fix skip 2025-03-14 23:05:55 +01:00
32b6fdacb6 Merge pull request 'fix form' (#59) from feature/persist-token into master
Reviewed-on: #59
2025-03-06 22:32:19 +00:00
2baaf3c126 fix form 2025-03-06 23:31:37 +01:00
2 changed files with 3 additions and 4 deletions

View File

@@ -84,8 +84,7 @@ async def read_events(
status_code=status.HTTP_400_BAD_REQUEST,
detail="`skip` should be >= 0 and `limit` should be > 0 and greater than `skip`.",
)
limit = limit + skip
skip = limit * skip
# Initialize filters
filters = []
@@ -166,7 +165,7 @@ async def search_events(
status_code=status.HTTP_400_BAD_REQUEST,
detail="`skip` should be >= 0 and `limit` should be > 0 and greater than `skip`.",
)
limit = limit + skip
skip = limit * skip
# Initialize filters
filters = [{"status": {"$eq": status}}]

View File

@@ -1,7 +1,7 @@
from datetime import datetime, timedelta
from typing import Annotated
from fastapi import Depends, FastAPI, HTTPException, status, APIRouter
from fastapi import Depends, FastAPI, HTTPException, status, APIRouter, Form
from fastapi.responses import JSONResponse
from fastapi.security import OAuth2PasswordBearer, OAuth2PasswordRequestForm
from ..dependencies import users_token, permissions_checker