referrals: enable referral for users & profiles

Enabling for individual users works, as does adding a template to a
profile. Removing/Disabling for both needs to be completed.
This commit is contained in:
Harvey Tindall
2023-09-06 22:00:44 +01:00
parent c2f835c897
commit 9e5034ebab
13 changed files with 224 additions and 31 deletions
+2
View File
@@ -228,6 +228,8 @@ func (app *appContext) loadRoutes(router *gin.Engine) {
api.POST(p+"/matrix/login", app.MatrixLogin)
if app.config.Section("user_page").Key("referrals").MustBool(false) {
api.POST(p+"/users/referral/:mode/:source", app.EnableReferralForUsers)
api.POST(p+"/profiles/referral/:profile/:invite", app.EnableReferralForProfile)
api.DELETE(p+"/profiles/referral/:profile", app.DisableReferralForProfile)
}
if userPageEnabled {