Compare commits

...

3 Commits

Author SHA1 Message Date
0880
3164c446c6 Merge branch 'main' of http://chai.bokhary.ir/0880/SlowAPI 2026-01-17 19:32:27 +03:30
0880
57ac6bcdd3 slow 2026-01-17 19:32:25 +03:30
0880
bd4a4bd6ac Major bug for JSONAPI 2026-01-17 19:29:58 +03:30

View File

@@ -243,6 +243,7 @@ class App:
await writer.drain()
except Exception as e:
raise e
print(f"Internal Server Error: {e}")
finally:
writer.close()
@@ -314,7 +315,7 @@ def JSONAPI(func):
and isinstance(result[1], dict)
and isinstance(result[0], int)
):
return JSONResponse(result[1], result[0])
return JSONResponse(kwargs["request"], result[1], result[0])
raise RuntimeError("Return value of JSONAPI route is not a dictionary")
return JSONResponse(kwargs["request"], result)