mirror of
https://github.com/simple-login/app.git
synced 2024-11-16 00:48:32 +01:00
Improve error message
This commit is contained in:
parent
deba806d0f
commit
c6db8db4a1
2 changed files with 3 additions and 3 deletions
|
@ -3,7 +3,7 @@ from flask import jsonify, request
|
||||||
from flask_cors import cross_origin
|
from flask_cors import cross_origin
|
||||||
|
|
||||||
from app.api.base import api_bp, verify_api_key
|
from app.api.base import api_bp, verify_api_key
|
||||||
from app.config import EMAIL_DOMAIN
|
from app.config import EMAIL_DOMAIN, MAX_NB_EMAIL_FREE_PLAN
|
||||||
from app.extensions import db
|
from app.extensions import db
|
||||||
from app.log import LOG
|
from app.log import LOG
|
||||||
from app.models import GenEmail, AliasUsedOn
|
from app.models import GenEmail, AliasUsedOn
|
||||||
|
@ -31,7 +31,7 @@ def new_custom_alias():
|
||||||
return (
|
return (
|
||||||
jsonify(
|
jsonify(
|
||||||
error="You have reached the limitation of a free account with the maximum of "
|
error="You have reached the limitation of a free account with the maximum of "
|
||||||
"3 custom aliases, please upgrade your plan to create more custom aliases"
|
f"{MAX_NB_EMAIL_FREE_PLAN} aliases, please upgrade your plan to create more aliases"
|
||||||
),
|
),
|
||||||
400,
|
400,
|
||||||
)
|
)
|
||||||
|
|
|
@ -48,5 +48,5 @@ def test_out_of_quota(flask_client):
|
||||||
|
|
||||||
assert r.status_code == 400
|
assert r.status_code == 400
|
||||||
assert r.json == {
|
assert r.json == {
|
||||||
"error": "You have reached the limitation of a free account with the maximum of 3 custom aliases, please upgrade your plan to create more custom aliases"
|
"error": "You have reached the limitation of a free account with the maximum of 3 aliases, please upgrade your plan to create more aliases"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue