@@ -330,23 +330,23 @@ public async Task CreateOrUpdateAsync(CreateBotRequest bot, CancellationToken ca
330
330
331
331
private async Task < BotSearchResponse > UpdateAsync ( Guid id , CreateBotRequest bot , CancellationToken cancellation )
332
332
{
333
- var url = $ "{ CultureInfo . CurrentCulture . Name } /project/bot/{ id } ";
333
+ var url = $ "{ CultureInfo . CurrentCulture . Name } /project/{ bot . ProjectId } / bot/{ id } ";
334
334
var response = await client . PutAsJsonAsync ( url , bot , SerializerOptions , cancellation ) ;
335
335
await response . ThrowWhenUnsuccessfulAsync ( cancellation ) ;
336
336
return await response . Content . ReadFromJsonAsync < BotSearchResponse > ( SerializerOptions , cancellation ) ?? throw new Exception ( "Could not convert the response" ) ;
337
337
}
338
338
339
339
private async Task < BotSearchResponse > CreateAsync ( CreateBotRequest bot , CancellationToken cancellation )
340
340
{
341
- var url = $ "{ CultureInfo . CurrentCulture . Name } /project/bot";
341
+ var url = $ "{ CultureInfo . CurrentCulture . Name } /project/{ bot . ProjectId } / bot";
342
342
var response = await client . PostAsJsonAsync ( url , bot , SerializerOptions , cancellation ) ;
343
343
await response . ThrowWhenUnsuccessfulAsync ( cancellation ) ;
344
344
return await response . Content . ReadFromJsonAsync < BotSearchResponse > ( SerializerOptions , cancellation ) ?? throw new Exception ( "Could not convert the response" ) ;
345
345
}
346
346
347
347
private async Task < IEnumerable < BotSearchResponse > > SearchAsync ( Guid projectId , string name , int limit , CancellationToken cancellation )
348
348
{
349
- var url = $ "{ CultureInfo . CurrentCulture . Name } /project/{ projectId } /bot?include=ScriptVersion& offset=0&limit={ limit } &search={ name } &orderBy=name&asc=true";
349
+ var url = $ "{ CultureInfo . CurrentCulture . Name } /project/{ projectId } /bot?offset=0&limit={ limit } &search={ name } &orderBy=name&asc=true";
350
350
var response = await client . GetFromJsonAsync < PagedResponse < BotSearchResponse > > ( url , SerializerOptions , cancellation ) ;
351
351
return response . Results ;
352
352
}
0 commit comments