add silenced warning on invites page

This commit is contained in:
Rob Loranger 2019-11-11 14:25:34 -08:00
parent bca678aee5
commit 9b69de166f
No known key found for this signature in database
GPG Key ID: D6F1633A4F0903B8
2 changed files with 12 additions and 1 deletions

View File

@ -56,12 +56,20 @@ func handleViewUserInvites(app *App, u *User, w http.ResponseWriter, r *http.Req
p := struct {
*UserPage
Invites *[]Invite
Invites *[]Invite
Suspended bool
}{
UserPage: NewUserPage(app, r, u, "Invite People", f),
}
var err error
p.Suspended, err = app.db.IsUserSuspended(u.ID)
if err != nil {
log.Error("view invites: %v", err)
return ErrInternalGeneral
}
p.Invites, err = app.db.GetUserInvites(u.ID)
if err != nil {
return err

View File

@ -31,6 +31,9 @@ table td {
</style>
<div class="snug content-container">
{{if .Suspended}}
{{template "user-suspended"}}
{{end}}
<h1>Invite people</h1>
<p>Invite others to join <em>{{.SiteName}}</em> by generating and sharing invite links below.</p>