mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-14 01:30:13 +00:00
bot: enable .NET configuration management
This commit is contained in:
parent
c5d2b7c251
commit
9b49f22048
5 changed files with 33 additions and 11 deletions
|
|
@ -25,15 +25,15 @@ namespace PluralKit {
|
|||
}
|
||||
|
||||
public async Task<PKSystem> GetByAccount(ulong accountId) {
|
||||
return await conn.QuerySingleAsync<PKSystem>("select systems.* from systems, accounts where accounts.system = system.id and accounts.uid = @Id", new { Id = accountId });
|
||||
return await conn.QuerySingleOrDefaultAsync<PKSystem>("select systems.* from systems, accounts where accounts.system = system.id and accounts.uid = @Id", new { Id = accountId });
|
||||
}
|
||||
|
||||
public async Task<PKSystem> GetByHid(string hid) {
|
||||
return await conn.QuerySingleAsync<PKSystem>("select * from systems where systems.hid = @Hid", new { Hid = hid.ToLower() });
|
||||
return await conn.QuerySingleOrDefaultAsync<PKSystem>("select * from systems where systems.hid = @Hid", new { Hid = hid.ToLower() });
|
||||
}
|
||||
|
||||
public async Task<PKSystem> GetByToken(string token) {
|
||||
return await conn.QuerySingleAsync<PKSystem>("select * from systems where token = @Token", new { Token = token });
|
||||
return await conn.QuerySingleOrDefaultAsync<PKSystem>("select * from systems where token = @Token", new { Token = token });
|
||||
}
|
||||
|
||||
public async Task Save(PKSystem system) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue