File tree 1 file changed +11
-1
lines changed
1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 65
65
66
66
void RunServer ( Context context )
67
67
{
68
+ var timer = new Timer ( 3000 )
69
+ {
70
+ AutoReset = true ,
71
+ } ;
72
+ timer . Elapsed += ( _ , _ ) => context . RefreshFiles ( ) ;
73
+ timer . Start ( ) ;
74
+
68
75
app . MapGet (
69
76
"/" ,
70
77
( ) => Results . Content (
@@ -177,7 +184,10 @@ await catalogResponse.Content.ReadAsStringAsync(),
177
184
else
178
185
{
179
186
var filePath = Path . Combine ( workBase , comparison . Path ) ;
180
- var fileContentResponse = await client . GetAsync ( fileApi + Convert . ToBase64String ( Encoding . UTF8 . GetBytes ( filePath ) ) ) ;
187
+ var fileName = Convert . ToBase64String (
188
+ Encoding . UTF8 . GetBytes ( comparison . Path )
189
+ ) ;
190
+ var fileContentResponse = await client . GetAsync ( $ "{ fileApi } { fileName } ") ;
181
191
if ( ! fileContentResponse . IsSuccessStatusCode )
182
192
{
183
193
app . Logger . LogError (
You can’t perform that action at this time.
0 commit comments