From 58303b8e9cf73f6d691229e2df25125c89f92b15 Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Sat, 4 May 2024 15:08:08 -0400 Subject: [PATCH] feat(aurora): added a to_json method to the moderation model --- aurora/models.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/aurora/models.py b/aurora/models.py index 6244ebf..4c0fff6 100644 --- a/aurora/models.py +++ b/aurora/models.py @@ -68,3 +68,7 @@ class Moderation(BaseModel): return cls(**case) return None + + def to_json(self, indent: int = None, file: bool = False): + from aurora.utilities.utils import dump, dumps + return dump(self.model_dump(), indent=indent) if file else dumps(self.model_dump(), indent=indent)