Added a /info endpoint

Contains useful info like version, and configurations
This commit is contained in:
Donkie
2023-07-10 11:46:19 +02:00
parent b9ee4626d3
commit 247df66736
2 changed files with 24 additions and 0 deletions

View File

@@ -188,6 +188,15 @@ class Spool(BaseModel):
)
class Info(BaseModel):
version: str = Field(example="0.7.0")
debug_mode: bool = Field(example=False)
automatic_backups: bool = Field(example=True)
data_dir: str = Field(example="/home/app/.local/share/spoolman")
backups_dir: str = Field(example="/home/app/.local/share/spoolman/backups")
db_type: str = Field(example="sqlite")
class HealthCheck(BaseModel):
status: str = Field(example="healthy")