mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 13:06:50 +00:00
Add looking up group by displayname; document this
This commit is contained in:
parent
537783dd96
commit
71461b3163
4 changed files with 9 additions and 3 deletions
|
|
@ -13,6 +13,9 @@ namespace PluralKit.Core
|
|||
public Task<PKGroup?> GetGroupByName(IPKConnection conn, SystemId system, string name) =>
|
||||
conn.QueryFirstOrDefaultAsync<PKGroup?>("select * from groups where system = @System and lower(Name) = lower(@Name)", new {System = system, Name = name});
|
||||
|
||||
public Task<PKGroup?> GetGroupByDisplayName(IPKConnection conn, SystemId system, string display_name) =>
|
||||
conn.QueryFirstOrDefaultAsync<PKGroup?>("select * from groups where system = @System and lower(display_name) = lower(@Name)", new {System = system, Name = display_name});
|
||||
|
||||
public Task<PKGroup?> GetGroupByHid(IPKConnection conn, string hid) =>
|
||||
conn.QueryFirstOrDefaultAsync<PKGroup?>("select * from groups where hid = @hid", new {hid = hid.ToLowerInvariant()});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue