<commit_before>package org.lizaalert.controllers;

import com.github.galimru.telegram.model.Update;
import org.lizaalert.builders.CommandBuilder;
import org.lizaalert.entities.State;
import org.lizaalert.entities.User;
import org.lizaalert.providers.UserProvider;
import org.lizaalert.repositories.StateRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@Controller
@RequestMapping("/api")
public class TelegramController {

    @Autowired private StateRepository stateRepository;
    @Autowired private UserProvider userProvider;

    @RequestMapping(path = "/update/{token}", method = RequestMethod.POST)
    public void update(@PathVariable String token, @RequestBody Update update) {
        User user = userProvider.getUser(update.getMessage().getFrom());<commit_msg>-- added response status for telegram request<commit_after>package org.lizaalert.controllers;

import com.github.galimru.telegram.model.Update;
import org.lizaalert.builders.CommandBuilder;
import org.lizaalert.entities.State;
import org.lizaalert.entities.User;
import org.lizaalert.providers.UserProvider;
import org.lizaalert.repositories.StateRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@Controller
@RequestMapping("/api")
public class TelegramController {

    @Autowired private StateRepository stateRepository;
    @Autowired private UserProvider userProvider;

    @ResponseStatus(HttpStatus.OK)
    @RequestMapping(path = "/update/{token}", method = RequestMethod.POST)
    public void update(@PathVariable String token, @RequestBody Update update) {
        User user = userProvider.getUser(update.getMessage().getFrom());
{'fraction_non_alphanumeric': 0.10078740157480315, 'fraction_numerical': 0.0, 'mean_word_length': 6.21969696969697, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '374031', 'n_tokens_mistral': 504, 'n_tokens_neox': 515, 'n_words': 104}