Sfoglia il codice sorgente

add id to invite response

Alexander Belanger 5 anni fa
parent
commit
2446f42edc
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  1. 2 0
      internal/models/invite.go

+ 2 - 0
internal/models/invite.go

@@ -20,6 +20,7 @@ type Invite struct {
 
 // InviteExternal represents the Invite type that is sent over REST
 type InviteExternal struct {
+	ID       uint   `json:"id"`
 	Token    string `json:"token"`
 	Expired  bool   `json:"expired"`
 	Email    string `json:"email"`
@@ -29,6 +30,7 @@ type InviteExternal struct {
 // Externalize generates an external Invite to be shared over REST
 func (i *Invite) Externalize() *InviteExternal {
 	return &InviteExternal{
+		ID:       i.Model.ID,
 		Token:    i.Token,
 		Email:    i.Email,
 		Expired:  i.IsExpired(),