feat(aurora): added a to_json method to the moderation model

This commit is contained in:
Seaswimmer 2024-05-04 15:08:08 -04:00
parent ca1722fee3
commit 58303b8e9c
Signed by untrusted user: cswimr
GPG key ID: 5D671B5D03D65A7F

View file

@ -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)