1
0
mirror of https://github.com/Mailu/Mailu.git synced 2025-11-27 22:18:22 +02:00

first try at api using flask-restx & marshmallow

This commit is contained in:
Alexander Graf
2021-01-06 17:05:21 +01:00
parent c30944404d
commit 866ad89dfc
5 changed files with 259 additions and 1 deletions

View File

@@ -0,0 +1,8 @@
from .. import models
def fqdn_in_use(*names):
for name in names:
for model in models.Domain, models.Alternative, models.Relay:
if model.query.get(name):
return model
return None