accounts: allow disabling of referrals for users

This commit is contained in:
Harvey Tindall
2023-09-07 14:00:30 +01:00
parent 7d9555fdf7
commit db21131185
4 changed files with 59 additions and 1 deletions
+1
View File
@@ -228,6 +228,7 @@ 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.DELETE(p+"/users/referral", app.DisableReferralForUsers)
api.POST(p+"/profiles/referral/:profile/:invite", app.EnableReferralForProfile)
api.DELETE(p+"/profiles/referral/:profile", app.DisableReferralForProfile)
}