mirror of
https://github.com/bitwarden/server
synced 2026-01-03 09:03:44 +00:00
user premium validation job
This commit is contained in:
@@ -19,12 +19,12 @@ namespace Bit.Core.Repositories.SqlServer
|
||||
: base(connectionString)
|
||||
{ }
|
||||
|
||||
public async Task<ICollection<Organization>> GetManyAsync()
|
||||
public async Task<ICollection<Organization>> GetManyByEnabledAsync()
|
||||
{
|
||||
using(var connection = new SqlConnection(ConnectionString))
|
||||
{
|
||||
var results = await connection.QueryAsync<Organization>(
|
||||
"[dbo].[Organization_Read]",
|
||||
"[dbo].[Organization_ReadByEnabled]",
|
||||
commandType: CommandType.StoredProcedure);
|
||||
|
||||
return results.ToList();
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
@@ -36,6 +37,19 @@ namespace Bit.Core.Repositories.SqlServer
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<ICollection<User>> GetManyByPremiumAsync(bool premium)
|
||||
{
|
||||
using(var connection = new SqlConnection(ConnectionString))
|
||||
{
|
||||
var results = await connection.QueryAsync<User>(
|
||||
"[dbo].[User_ReadByPremium]",
|
||||
new { Premium = premium },
|
||||
commandType: CommandType.StoredProcedure);
|
||||
|
||||
return results.ToList();
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<string> GetPublicKeyAsync(Guid id)
|
||||
{
|
||||
using(var connection = new SqlConnection(ConnectionString))
|
||||
|
||||
Reference in New Issue
Block a user