Browse Source

ui start 2.5

main
gsd 5 months ago
parent
commit
df607a1246
  1. 3
      webExtensions/messageList.py

3
webExtensions/messageList.py

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

Loading…
Cancel
Save