mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-14 01:30:13 +00:00
Compare commits
2 commits
09ed215e6c
...
492cce6223
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
492cce6223 | ||
|
|
b0e1a7b9ff |
2 changed files with 5 additions and 2 deletions
|
|
@ -35,7 +35,10 @@ public class BaseRestClient: IAsyncDisposable
|
|||
if (!token.StartsWith("Bot "))
|
||||
token = "Bot " + token;
|
||||
|
||||
Client = new HttpClient();
|
||||
Client = new HttpClient(new SocketsHttpHandler
|
||||
{
|
||||
PooledConnectionIdleTimeout = TimeSpan.FromSeconds(3),
|
||||
});
|
||||
Client.DefaultRequestHeaders.TryAddWithoutValidation("User-Agent", userAgent);
|
||||
Client.DefaultRequestHeaders.TryAddWithoutValidation("Authorization", token);
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ public partial class ModelRepository
|
|||
|
||||
public Task<PKMember?> GetMemberByHid(string hid, SystemId? system = null)
|
||||
{
|
||||
var query = new Query("members").Where("hid", hid.ToLower());
|
||||
var query = new Query("members").WhereRaw("hid = (?)::char(6)", hid.ToLower());
|
||||
if (system != null)
|
||||
query = query.Where("system", system);
|
||||
return _db.QueryFirst<PKMember?>(query);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue