Skip to content

Commit

Permalink
used preregistered JsonSerializerOptions with JsonSerializerDefaults.…
Browse files Browse the repository at this point in the history
…Web to serialize answer at camelCase naming policy
  • Loading branch information
granstel committed Jun 11, 2024
1 parent d1763ce commit 9a26e80
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Dodo1000Bot.Messengers.Telegram/TelegramController.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Threading.Tasks;
using System.Text.Json;
using System.Threading.Tasks;
using Dodo1000Bot.Models;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
Expand All @@ -10,10 +11,11 @@ public class TelegramController : MessengerController<Update, Response>
{
private readonly ITelegramService _telegramService;

public TelegramController(ILogger<TelegramController> log, ITelegramService telegramService, TelegramConfiguration configuration)
public TelegramController(ILogger<TelegramController> log, ITelegramService telegramService, TelegramConfiguration configuration, JsonSerializerOptions jsonOptions)
: base(log, telegramService, configuration)
{
_telegramService = telegramService;
SerializerSettings = jsonOptions;
}

[HttpGet("TestTelegramApi")]
Expand Down

0 comments on commit 9a26e80

Please sign in to comment.