workspace working

This commit is contained in:
2026-01-12 22:31:11 +08:00
parent 2738a822d1
commit 370fe6368a
149 changed files with 4648 additions and 660 deletions

27
test_paginated.py Normal file
View File

@@ -0,0 +1,27 @@
import asyncio
import aiohttp
import json
async def test():
url = "http://localhost:3015/documents/paginated"
headers = {
"X-API-Key": "jleu1212",
"Content-Type": "application/json",
"X-Workspace": "test"
}
data = {
"page": 1,
"page_size": 10
}
async with aiohttp.ClientSession() as session:
async with session.post(url, headers=headers, json=data) as resp:
print(f"Status: {resp.status}")
if resp.status == 200:
result = await resp.json()
print(json.dumps(result, indent=2))
else:
error = await resp.text()
print(f"Error: {error}")
if __name__ == "__main__":
asyncio.run(test())