1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-05 10:02:47 -05:00

Fix/f4e multiple sponsorships (#1838)

* Use sponosorship from validate to redeem

* Update tests

* Format
This commit is contained in:
Matt Gibson
2022-02-02 13:59:47 -05:00
committed by GitHub
parent 452677e441
commit 8ce4d56a91
6 changed files with 41 additions and 34 deletions

View File

@ -48,21 +48,5 @@ namespace Bit.Infrastructure.Dapper.Repositories
return results.SingleOrDefault();
}
}
public async Task<OrganizationSponsorship> GetByOfferedToEmailAsync(string offeredToEmail)
{
using (var connection = new SqlConnection(ConnectionString))
{
var results = await connection.QueryAsync<OrganizationSponsorship>(
"[dbo].[OrganizationSponsorship_ReadByOfferedToEmail]",
new
{
OfferedToEmail = offeredToEmail
},
commandType: CommandType.StoredProcedure);
return results.SingleOrDefault();
}
}
}
}