mirror of
https://github.com/simple-login/app.git
synced 2024-11-16 08:58:30 +01:00
Return contact id
This commit is contained in:
parent
1d579e7490
commit
9ae6ba323c
2 changed files with 4 additions and 0 deletions
|
@ -946,6 +946,7 @@ If success, 200 with the list of contacts, for example:
|
||||||
{
|
{
|
||||||
"contacts": [
|
"contacts": [
|
||||||
{
|
{
|
||||||
|
"id": 1,
|
||||||
"contact": "marketing@example.com",
|
"contact": "marketing@example.com",
|
||||||
"creation_date": "2020-02-21 11:35:00+00:00",
|
"creation_date": "2020-02-21 11:35:00+00:00",
|
||||||
"creation_timestamp": 1582284900,
|
"creation_timestamp": 1582284900,
|
||||||
|
@ -954,6 +955,7 @@ If success, 200 with the list of contacts, for example:
|
||||||
"reverse_alias": "marketing at example.com <reply+bzvpazcdedcgcpztehxzgjgzmxskqa@sl.co>"
|
"reverse_alias": "marketing at example.com <reply+bzvpazcdedcgcpztehxzgjgzmxskqa@sl.co>"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"id": 2,
|
||||||
"contact": "newsletter@example.com",
|
"contact": "newsletter@example.com",
|
||||||
"creation_date": "2020-02-21 11:35:00+00:00",
|
"creation_date": "2020-02-21 11:35:00+00:00",
|
||||||
"creation_timestamp": 1582284900,
|
"creation_timestamp": 1582284900,
|
||||||
|
@ -983,6 +985,7 @@ Return 409 if contact is already added.
|
||||||
|
|
||||||
```
|
```
|
||||||
{
|
{
|
||||||
|
"id": 1,
|
||||||
"contact": "First Last <first@example.com>",
|
"contact": "First Last <first@example.com>",
|
||||||
"creation_date": "2020-03-14 11:52:41+00:00",
|
"creation_date": "2020-03-14 11:52:41+00:00",
|
||||||
"creation_timestamp": 1584186761,
|
"creation_timestamp": 1584186761,
|
||||||
|
|
|
@ -202,6 +202,7 @@ def update_alias(alias_id):
|
||||||
def serialize_contact(fe: Contact) -> dict:
|
def serialize_contact(fe: Contact) -> dict:
|
||||||
|
|
||||||
res = {
|
res = {
|
||||||
|
"id": fe.id,
|
||||||
"creation_date": fe.created_at.format(),
|
"creation_date": fe.created_at.format(),
|
||||||
"creation_timestamp": fe.created_at.timestamp,
|
"creation_timestamp": fe.created_at.timestamp,
|
||||||
"last_email_sent_date": None,
|
"last_email_sent_date": None,
|
||||||
|
|
Loading…
Reference in a new issue