mirror of
https://github.com/shadoll/scatcher.git
synced 2025-12-20 00:25:58 +00:00
Fix formatting issues in history_controller.py and manager/history.py, and update default values in request_data.py
This commit is contained in:
@@ -37,7 +37,7 @@ class HistoryController(BaseController):
|
||||
status=Status.error,
|
||||
message="No requests found.",
|
||||
)
|
||||
return [RequestData(**d) for d in items ]
|
||||
return [RequestData(**d) for d in items]
|
||||
|
||||
async def last_requests(
|
||||
self,
|
||||
|
||||
@@ -36,8 +36,8 @@ class History:
|
||||
if len(self.data) == 0:
|
||||
return None
|
||||
for item in self.data:
|
||||
if "method" in item:
|
||||
item["method"] = Methods(item["method"])
|
||||
if "method" in item:
|
||||
item["method"] = Methods(item["method"])
|
||||
return self.data
|
||||
|
||||
def get(self, index: int) -> dict | None:
|
||||
|
||||
@@ -4,9 +4,9 @@ from schema.methods import Methods
|
||||
|
||||
class RequestData(BaseModel):
|
||||
method: Methods = Methods.GET
|
||||
data: dict = {}
|
||||
data: dict|None = None
|
||||
params: dict = {}
|
||||
form: dict = {}
|
||||
form: dict|None = None
|
||||
url: str
|
||||
headers: dict = {}
|
||||
cookies: dict = {}
|
||||
|
||||
Reference in New Issue
Block a user