mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-11 00:07:55 +00:00
refactor: add SqlKata for SQL generation, move connection handling into ModelRepository
This commit is contained in:
parent
6251d29abb
commit
92e45a07ff
60 changed files with 806 additions and 640 deletions
|
|
@ -50,8 +50,7 @@ namespace PluralKit.Bot
|
|||
|
||||
private async Task<string> MakeAndSetNewToken(PKSystem system)
|
||||
{
|
||||
var patch = new SystemPatch { Token = StringUtils.GenerateToken() };
|
||||
system = await _db.Execute(conn => _repo.UpdateSystem(conn, system.Id, patch));
|
||||
system = await _repo.UpdateSystem(system.Id, new() { Token = StringUtils.GenerateToken() });
|
||||
return system.Token;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue