diff --git a/NostrStreamer/Services/UserService.cs b/NostrStreamer/Services/UserService.cs index f6d746b..48d68a5 100644 --- a/NostrStreamer/Services/UserService.cs +++ b/NostrStreamer/Services/UserService.cs @@ -86,6 +86,8 @@ public class UserService var user = await GetUser(pubkey); if (user == default) throw new Exception("No user found"); + if (!user.IsAdmin) throw new Exception("Withdrawal disabled"); + var maxOut = await MaxWithdrawalAmount(pubkey); var pr = BOLT11PaymentRequest.Parse(invoice, invoice.StartsWith("lnbc") ? Network.Main : Network.RegTest); if (pr.MinimumAmount == 0) @@ -263,4 +265,4 @@ public class UserService .SetProperty(v => v.ContentWarning, req.ContentWarning) .SetProperty(v => v.Goal, req.Goal)); } -} +} \ No newline at end of file