<commit_before>﻿using System.Threading.Tasks;
using AutoMapper;
using Core.Interfaces.RepositoryInterfaces;
using Core.Models;
using Microsoft.AspNetCore.Mvc;
using Web.ActionFilters;
using Web.Helpers;
using Web.Models.SocialMediaLinkModels;

namespace Web.Controllers
{
    [Route("api/[controller]")]
    public class SocialMediaLinksController : Controller
    {
        private readonly ControllerRequestHelper<SocialMediaLinkDomainModel, SocialMediaLinkViewModel> _controllerRequestHelper;
        public SocialMediaLinksController(ISocialMediaLinkRepository socialMediaLinkRepository, IMapper mapper)
        {
            _controllerRequestHelper = new ControllerRequestHelper<SocialMediaLinkDomainModel, SocialMediaLinkViewModel>(socialMediaLinkRepository, mapper);
        }

        [HttpGet]
        public async Task<IActionResult> GetAllJobs()
        {
            return await _controllerRequestHelper.GetAll();
        }

        [HttpGet("{id}", Name = "GetSocialMediaLink")]
        public async Task<IActionResult> GetJob(int id)
        {
            return await _controllerRequestHelper.GetById(id);
        }

        [HttpPost]
        [ModelStateValidation]
        public async Task<IActionResult> AddJob([FromBody] AddSocialMediaLinkViewModel entity)
        {
            return await _controllerRequestHelper.Add(entity, "GetSocialMediaLink");
        }

        [HttpPut("{id}")]
        [ModelStateValidation]
        [ModelHasCorrectId]
        public async Task<IActionResult> UpdateJob(int id, [FromBody] UpdateSocialMediaLinkViewModel entity)
        {
            return await _controllerRequestHelper.Update(id, entity);
        }

        [HttpDelete("{id}")]
        public async Task<IActionResult> DeleteJob(int id)
        {
            return await _controllerRequestHelper.Delete(id);
        }
    }
}<commit_msg>foiled again by copy paste<commit_after>﻿using System.Threading.Tasks;
using AutoMapper;
using Core.Interfaces.RepositoryInterfaces;
using Core.Models;
using Microsoft.AspNetCore.Mvc;
using Web.ActionFilters;
using Web.Helpers;
using Web.Models.SocialMediaLinkModels;

namespace Web.Controllers
{
    [Route("api/[controller]")]
    public class SocialMediaLinksController : Controller
    {
        private readonly ControllerRequestHelper<SocialMediaLinkDomainModel, SocialMediaLinkViewModel> _controllerRequestHelper;
        public SocialMediaLinksController(ISocialMediaLinkRepository socialMediaLinkRepository, IMapper mapper)
        {
            _controllerRequestHelper = new ControllerRequestHelper<SocialMediaLinkDomainModel, SocialMediaLinkViewModel>(socialMediaLinkRepository, mapper);
        }

        [HttpGet]
        public async Task<IActionResult> GetAllSocialMediaLinks()
        {
            return await _controllerRequestHelper.GetAll();
        }

        [HttpGet("{id}", Name = "GetSocialMediaLink")]
        public async Task<IActionResult> GetSocialMediaLink(int id)
        {
            return await _controllerRequestHelper.GetById(id);
        }

        [HttpPost]
        [ModelStateValidation]
        public async Task<IActionResult> AddSocialMediaLink([FromBody] AddSocialMediaLinkViewModel entity)
        {
            return await _controllerRequestHelper.Add(entity, "GetSocialMediaLink");
        }

        [HttpPut("{id}")]
        [ModelStateValidation]
        [ModelHasCorrectId]
        public async Task<IActionResult> UpdateSocialMediaLink(int id, [FromBody] UpdateSocialMediaLinkViewModel entity)
        {
            return await _controllerRequestHelper.Update(id, entity);
        }

        [HttpDelete("{id}")]
        public async Task<IActionResult> DeleteSocialMediaLink(int id)
        {
            return await _controllerRequestHelper.Delete(id);
        }
    }
}
{'fraction_non_alphanumeric': 0.0801899235030335, 'fraction_numerical': 0.0, 'mean_word_length': 3.2944507361268403, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, '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': '5619465', 'n_tokens_mistral': 980, 'n_tokens_neox': 951, 'n_words': 190}