mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-06 05:47:53 +00:00
Add group name/description/list commands
This commit is contained in:
parent
253ae43c7f
commit
6c5cb8cea7
7 changed files with 152 additions and 6 deletions
|
|
@ -65,5 +65,13 @@ namespace PluralKit.Core
|
|||
conn.QueryFirstAsync<PKGroup>(
|
||||
"insert into groups (hid, system, name) values (find_free_group_hid(), @System, @Name) returning *",
|
||||
new {System = system, Name = name});
|
||||
|
||||
public static Task<PKGroup> UpdateGroup(this IPKConnection conn, GroupId id, GroupPatch patch)
|
||||
{
|
||||
var (query, pms) = patch.Apply(UpdateQueryBuilder.Update("groups", "id = @id"))
|
||||
.WithConstant("id", id)
|
||||
.Build("returning *");
|
||||
return conn.QueryFirstAsync<PKGroup>(query, pms);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue