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