Преглед на файлове

add id to invite response

Alexander Belanger преди 5 години
родител
ревизия
2446f42edc
променени са 1 файла, в които са добавени 2 реда и са изтрити 0 реда
  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(),