mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 13:06:50 +00:00
feat: use sqlkata for a few more queries
This commit is contained in:
parent
8a727c6e80
commit
b2e4ff38e3
5 changed files with 8 additions and 15 deletions
|
|
@ -7,7 +7,7 @@ namespace PluralKit.Core;
|
|||
public partial class ModelRepository
|
||||
{
|
||||
public async Task<ulong?> GetDmChannel(ulong id)
|
||||
=> await _db.Execute(c => c.QueryFirstOrDefaultAsync<ulong?>("select dm_channel from accounts where uid = @id", new { id = id }));
|
||||
=> await _db.QueryFirst<ulong?>(new Query("accounts").Select("dm_channel").Where("uid", id));
|
||||
|
||||
public async Task<bool> GetAutoproxyEnabled(ulong id)
|
||||
=> await _db.QueryFirst<bool>(new Query("accounts").Select("allow_autoproxy").Where("uid", id));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue