Return status constants instead of strings

This commit is contained in:
2026-01-23 21:25:33 +01:00
parent faa1e4afd5
commit 8b186d6e95
2 changed files with 42 additions and 16 deletions

View File

@@ -10,6 +10,15 @@ import datetime
__version__ = "1.0.0"
__author__ = "Thomas Oettli <spacefreak@noop.ch>"
# DynDNS-compatible response statuses
STATUS_GOOD = "good"
STATUS_NOCHG = "nochg"
STATUS_BADAUTH = "badauth"
STATUS_NOHOST = "nohost"
STATUS_DNSERR = "dnserr"
STATUS_ABUSE = "abuse"
STATUS_BADIP = "badip"
__all__ = [
"app",
"cleanup",
@@ -23,6 +32,13 @@ __all__ = [
"models",
"ratelimit",
"server",
"STATUS_GOOD",
"STATUS_NOCHG",
"STATUS_BADAUTH",
"STATUS_NOHOST",
"STATUS_DNSERR",
"STATUS_ABUSE",
"STATUS_BADIP",
]
DATETIME_FORMAT = "%Y-%m-%d %H:%M:%S %Z"