Add obsolete warnings

This commit is contained in:
Son NK 2020-05-02 16:23:40 +02:00
parent d32669f515
commit 62bec84900
2 changed files with 5 additions and 1 deletions

View File

@ -27,7 +27,7 @@ def options():
existing: array of existing aliases
"""
LOG.warning("/v2/alias/options should be used instead")
LOG.warning("/alias/options is obsolete")
user = g.user
hostname = request.args.get("hostname")
@ -107,6 +107,8 @@ def options_v2():
"""
LOG.warning("/v2/alias/options is obsolete")
user = g.user
hostname = request.args.get("hostname")
@ -186,6 +188,7 @@ def options_v3():
"""
LOG.warning("/v3/alias/options is obsolete")
user = g.user
hostname = request.args.get("hostname")

View File

@ -29,6 +29,7 @@ def new_custom_alias():
409 if the alias already exists
"""
LOG.warning("/alias/custom/new is obsolete")
user: User = g.user
if not user.can_create_new_alias():
LOG.d("user %s cannot create any custom alias", user)