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
+1 -1
View File
@@ -646,7 +646,7 @@ func (app *appContext) GetMyReferral(gc *gin.Context) {
err := app.storage.db.Find(&inv, badgerhold.Where("ReferrerJellyfinID").Eq(gc.GetString("jfId")))
if err != nil {
// 2. Look for a template matching the key found in the user storage
// Since this key is shared between a profile, we make a copy.
// Since this key is shared between users in a profile, we make a copy.
user, ok := app.storage.GetEmailsKey(gc.GetString("jfId"))
err = app.storage.db.Get(user.ReferralTemplateKey, &inv)
if !ok || err != nil {