소스 검색

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(),