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

View File

@@ -71,10 +71,11 @@ type inviteProfileDTO struct {
}
type profileDTO struct {
Admin bool `json:"admin" example:"false"` // Whether profile has admin rights or not
LibraryAccess string `json:"libraries" example:"all"` // Number of libraries profile has access to
FromUser string `json:"fromUser" example:"jeff"` // The user the profile is based on
Ombi bool `json:"ombi"` // Whether or not Ombi settings are stored in this profile.
Admin bool `json:"admin" example:"false"` // Whether profile has admin rights or not
LibraryAccess string `json:"libraries" example:"all"` // Number of libraries profile has access to
FromUser string `json:"fromUser" example:"jeff"` // The user the profile is based on
Ombi bool `json:"ombi"` // Whether or not Ombi settings are stored in this profile.
ReferralsEnabled bool `json:"referrals_enabled" example:"true"` // Whether or not the profile has referrals enabled, and has a template invite stored.
}
type getProfilesDTO struct {
@@ -423,6 +424,5 @@ type GetMyReferralRespDTO struct {
}
type EnableDisableReferralDTO struct {
Users []string `json:"users"`
Enabled bool `json:"enabled"`
Users []string `json:"users"`
}