Migrate GetSystemById
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
#nullable enable
|
||||
using System.Data;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using Dapper;
|
||||
@@ -8,6 +7,9 @@ namespace PluralKit.Core
|
||||
{
|
||||
public static class ModelQueryExt
|
||||
{
|
||||
public static Task<PKSystem?> QuerySystem(this IPKConnection conn, int id) =>
|
||||
conn.QueryFirstOrDefaultAsync<PKSystem?>("select * from systems where id = @id", new {id});
|
||||
|
||||
public static Task<PKMember?> QueryMember(this IPKConnection conn, int id) =>
|
||||
conn.QueryFirstOrDefaultAsync<PKMember?>("select * from members where id = @id", new {id});
|
||||
|
||||
|
||||
@@ -51,12 +51,6 @@ namespace PluralKit.Core {
|
||||
|
||||
public interface IDataStore
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets a system by its internal system ID.
|
||||
/// </summary>
|
||||
/// <returns>The <see cref="PKSystem"/> with the given internal ID, or null if no system was found.</returns>
|
||||
Task<PKSystem> GetSystemById(int systemId);
|
||||
|
||||
/// <summary>
|
||||
/// Gets a system by its user-facing human ID.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user