mirror of
https://github.com/penpot/penpot.git
synced 2025-06-07 07:41:39 +02:00
✨ Add created-by to invitations, and an event related
This commit is contained in:
parent
e1e13bcfb1
commit
cbc92e9f1e
4 changed files with 16 additions and 4 deletions
|
@ -759,8 +759,8 @@
|
|||
;; --- Mutation: Create Team Invitation
|
||||
|
||||
(def sql:upsert-team-invitation
|
||||
"insert into team_invitation(id, team_id, email_to, role, valid_until)
|
||||
values (?, ?, ?, ?, ?)
|
||||
"insert into team_invitation(id, team_id, email_to, role, valid_until, created_by)
|
||||
values (?, ?, ?, ?, ?, ?)
|
||||
on conflict(team_id, email_to) do
|
||||
update set role = ?, valid_until = ?, updated_at = now()
|
||||
returning *")
|
||||
|
@ -853,6 +853,7 @@
|
|||
invitation (db/exec-one! conn [sql:upsert-team-invitation id
|
||||
(:id team) (str/lower email)
|
||||
(name role) expire
|
||||
(:id profile)
|
||||
(name role) expire])
|
||||
updated? (not= id (:id invitation))
|
||||
profile-id (:id profile)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue