feat(api): implement paused status exposure for service api

This commit is contained in:
QuantumGhost
2026-01-27 09:26:16 +08:00
parent 116ec9dd04
commit 7c33e5107b
10 changed files with 155 additions and 12 deletions

View File

@ -94,6 +94,13 @@ class TimestampField(fields.Raw):
return int(value.timestamp())
class OptionalTimestampField(fields.Raw):
def format(self, value) -> int | None:
if value is None:
return None
return int(value.timestamp())
def email(email):
# Define a regex pattern for email addresses
pattern = r"^[\w\.!#$%&'*+\-/=?^_`{|}~]+@([\w-]+\.)+[\w-]{2,}$"