feat(chalice): get all webhooks
This commit is contained in:
parent
24b6e91f6c
commit
5738fd7bc7
2 changed files with 2 additions and 3 deletions
|
|
@ -54,7 +54,7 @@ def get_by_tenant(tenant_id, replace_none=False):
|
|||
with pg_client.PostgresClient() as cur:
|
||||
cur.execute("""SELECT w.*
|
||||
FROM public.webhooks AS w
|
||||
WHERE deleted_at ISNULL AND type='webhook';""")
|
||||
WHERE deleted_at ISNULL;""")
|
||||
all = helper.list_to_camel_case(cur.fetchall())
|
||||
for w in all:
|
||||
w["createdAt"] = TimeUTC.datetime_to_timestamp(w["createdAt"])
|
||||
|
|
|
|||
|
|
@ -58,8 +58,7 @@ def get_by_tenant(tenant_id, replace_none=False):
|
|||
cur.mogrify("""SELECT w.*
|
||||
FROM public.webhooks AS w
|
||||
WHERE w.tenant_id =%(tenant_id)s
|
||||
AND deleted_at ISNULL
|
||||
AND type='webhook';""",
|
||||
AND deleted_at ISNULL;""",
|
||||
{"tenant_id": tenant_id})
|
||||
)
|
||||
all = helper.list_to_camel_case(cur.fetchall())
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue