mirror of
https://github.com/DrMboga/WotBlitzStatisticsBlazor.git
synced 2026-10-24 11:50:05 +02:00
feat: Passing Wargaming Token for Gather application mutation
This commit is contained in:
1 parent
0b5da2f7c6
commit
c9f933235c
8 files changed
+50
-17
No files matched your search
@@ -94,7 +94,16 @@ namespace WotBlitzStatisticsPro.GraphQl
|
||||
.AddHttpRequestInterceptor(
|
||||
(context, executor, builder, ct) =>
|
||||
{
|
||||
// your code
|
||||
// Get WgAccessToken from header and push it into context
|
||||
if (context.Request.Headers.ContainsKey("WargamingToken"))
|
||||
{
|
||||
var token = context.Request.Headers["WargamingToken"];
|
||||
if (token.Count == 1)
|
||||
{
|
||||
builder.SetProperty("WgToken", token[0]);
|
||||
}
|
||||
}
|
||||
|
||||
return ValueTask.CompletedTask;
|
||||
})
|
||||
;
|
||||
|
||||
Reference in new issue
Block a user