1
0
mirror of https://github.com/bitwarden/server synced 2025-12-13 23:03:36 +00:00

Stricter scene and query types

SeederAPI only serves Scenes, Recipes are inteded to be used locally only.
This commit is contained in:
Matt Gibson
2025-10-29 12:27:15 -07:00
parent 16ee5cfaad
commit 878b78b51e
14 changed files with 261 additions and 204 deletions

View File

@@ -1,4 +1,4 @@
namespace Bit.Seeder;
namespace Bit.Seeder;
public interface IQuery
{
@@ -6,9 +6,9 @@ public interface IQuery
object Execute(object request);
}
public interface IQuery<TRequest> : IQuery where TRequest : class
public interface IQuery<TRequest, TResult> : IQuery where TRequest : class where TResult : class
{
object Execute(TRequest request);
TResult Execute(TRequest request);
Type IQuery.GetRequestType() => typeof(TRequest);
object IQuery.Execute(object request) => Execute((TRequest)request);