mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-16 02:02:55 -07:00
This commit is contained in:
parent
4d2539e1a2
commit
17502d695b
3 changed files with 5 additions and 12 deletions
|
@ -18,7 +18,6 @@ namespace PlexRequests.UI.Modules
|
|||
public DonationLinkModule(ICacheProvider provider, ISettingsService<PlexRequestSettings> pr, ISecurityExtensions security) : base("customDonation", pr, security)
|
||||
{
|
||||
Cache = provider;
|
||||
|
||||
Get["/", true] = async (x, ct) => await GetCustomDonationUrl(pr);
|
||||
}
|
||||
|
||||
|
@ -31,14 +30,12 @@ namespace PlexRequests.UI.Modules
|
|||
PlexRequestSettings settings = await pr.GetSettingsAsync();
|
||||
try
|
||||
{
|
||||
if (settings.EnableCustomDonationUrl)
|
||||
if (settings.EnableCustomDonationUrl && Security.IsLoggedIn(Context))
|
||||
{
|
||||
return Response.AsJson(new { url = settings.CustomDonationUrl, message = settings.CustomDonationMessage, enabled = true });
|
||||
}
|
||||
else
|
||||
{
|
||||
return Response.AsJson(new { enabled = false });
|
||||
}
|
||||
|
||||
return Response.AsJson(new { enabled = false });
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue