invites: editable label, /invites/edit route

PATCH /invite/edit lets you edit an invite by giving new values for a
subset of inviteDTO (EditableInviteDTO). Replaces /invite/profile and
/invite/notify, and allows changing (user)label and user expiry as well
as the previously customizable values through other routes. An edit
button next to the code/label allows changing on the invites tab.
This commit is contained in:
Harvey Tindall
2025-12-06 15:38:06 +00:00
parent 4bb116417e
commit 44e4b5fce2
6 changed files with 232 additions and 120 deletions
+1 -2
View File
@@ -212,8 +212,8 @@ func (app *appContext) loadRoutes(router *gin.Engine) {
api.GET(p+"/invites/count", app.GetInviteCount)
api.GET(p+"/invites/count/used", app.GetInviteUsedCount)
api.DELETE(p+"/invites", app.DeleteInvite)
api.POST(p+"/invites/profile", app.SetProfile)
api.POST(p+"/invites/send", app.SendInvite)
api.PATCH(p+"/invites/edit", app.EditInvite)
api.GET(p+"/profiles", app.GetProfiles)
api.GET(p+"/profiles/names", app.GetProfileNames)
api.GET(p+"/profiles/raw/:name", app.GetRawProfile)
@@ -221,7 +221,6 @@ func (app *appContext) loadRoutes(router *gin.Engine) {
api.POST(p+"/profiles/default", app.SetDefaultProfile)
api.POST(p+"/profiles", app.CreateProfile)
api.DELETE(p+"/profiles", app.DeleteProfile)
api.POST(p+"/invites/notify", app.SetNotify)
api.POST(p+"/users/emails", app.ModifyEmails)
api.POST(p+"/users/labels", app.ModifyLabels)
api.POST(p+"/users/accounts-admin", app.SetAccountsAdmin)