|
|
|
@ -1,5 +1,6 @@ |
|
|
|
from fastapi import FastAPI |
|
|
|
from fastapi.responses import HTMLResponse |
|
|
|
from fastapi.requests import Request |
|
|
|
from fastapi import Query |
|
|
|
|
|
|
|
from pymongo.asynchronous.database import AsyncDatabase |
|
|
|
@ -18,7 +19,7 @@ class WebExtension: |
|
|
|
|
|
|
|
@self.app.get(f"{self.core.context}/messages") |
|
|
|
@self.core.authManager.authRequest() |
|
|
|
async def listOfMessages(limit: int = Query(10), offset: int = Query(0)): |
|
|
|
async def listOfMessages(request: Request, limit: int = Query(10), offset: int = Query(0)): |
|
|
|
collection = self.dbStore['packet'] |
|
|
|
c = collection.find({ |
|
|
|
"to": int(self.core.PUB_CH), |
|
|
|
|