mirror of
https://github.com/bitwarden/server.git
synced 2025-07-01 08:02:49 -05:00
bad request if no ids on subscription
This commit is contained in:
@ -218,8 +218,11 @@ namespace Bit.Billing.Controllers
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ids.Item1.HasValue || ids.Item2.HasValue)
|
if(!ids.Item1.HasValue && !ids.Item2.HasValue)
|
||||||
{
|
{
|
||||||
|
return new BadRequestResult();
|
||||||
|
}
|
||||||
|
|
||||||
var tx = new Transaction
|
var tx = new Transaction
|
||||||
{
|
{
|
||||||
Amount = charge.Amount / 100M,
|
Amount = charge.Amount / 100M,
|
||||||
@ -253,7 +256,6 @@ namespace Bit.Billing.Controllers
|
|||||||
// Catch foreign key violations because user/org could have been deleted.
|
// Catch foreign key violations because user/org could have been deleted.
|
||||||
catch(SqlException e) when(e.Number == 547) { }
|
catch(SqlException e) when(e.Number == 547) { }
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else if(parsedEvent.Type.Equals("charge.refunded"))
|
else if(parsedEvent.Type.Equals("charge.refunded"))
|
||||||
{
|
{
|
||||||
if(!(parsedEvent.Data.Object is Charge charge))
|
if(!(parsedEvent.Data.Object is Charge charge))
|
||||||
|
Reference in New Issue
Block a user