Procházet zdrojové kódy

add "enabled" to returned alias

Son NK před 5 roky
rodič
revize
1241199e23
2 změnil soubory, kde provedl 5 přidání a 2 odebrání
  1. 4 2
      README.md
  2. 1 0
      app/api/views/alias.py

+ 4 - 2
README.md

@@ -758,7 +758,8 @@ If success, 200 with the list of aliases, for example:
             "id": 4,
             "nb_block": 0,
             "nb_forward": 0,
-            "nb_reply": 0
+            "nb_reply": 0,
+            "enabled": true 
         },
         {
             "creation_date": "2020-02-04 16:23:02+00:00",
@@ -767,7 +768,8 @@ If success, 200 with the list of aliases, for example:
             "id": 3,
             "nb_block": 0,
             "nb_forward": 0,
-            "nb_reply": 0
+            "nb_reply": 0,
+            "enabled": false
         }
     ]
 }

+ 1 - 0
app/api/views/alias.py

@@ -46,6 +46,7 @@ def get_aliases():
                     "nb_forward": alias.nb_forward,
                     "nb_block": alias.nb_blocked,
                     "nb_reply": alias.nb_reply,
+                    "enabled": alias.gen_email.enabled,
                 }
                 for alias in aliases
             ]