<commit_before>package streama

import grails.converters.JSON

import static org.springframework.http.HttpStatus.*
import grails.transaction.Transactional

@Transactional(readOnly = true)
class TvShowController {

    def thetvdbService

    static responseFormats = ['json', 'xml']
    static allowedMethods = [save: "POST",  delete: "DELETE"]

    def index() {
        JSON.use('fullShow'){
            respond TvShow.findAllByDeletedNotEqual(true), [status: OK]
        }
    }

    @Transactional
    def save() {
        def data = request.JSON
        data.fanart = thetvdbService.BASE_PATH_GRAPHICS + data.fanart
        
        if (data == null) {
            render status: NOT_FOUND<commit_msg>removed unneeded and old fanart logic (from old api)<commit_after>package streama

import grails.converters.JSON

import static org.springframework.http.HttpStatus.*
import grails.transaction.Transactional

@Transactional(readOnly = true)
class TvShowController {

    def thetvdbService

    static responseFormats = ['json', 'xml']
    static allowedMethods = [save: "POST",  delete: "DELETE"]

    def index() {
        JSON.use('fullShow'){
            respond TvShow.findAllByDeletedNotEqual(true), [status: OK]
        }
    }

    @Transactional
    def save() {
        def data = request.JSON
        
        if (data == null) {
            render status: NOT_FOUND
{'fraction_non_alphanumeric': 0.09920347574221579, 'fraction_numerical': 0.0, 'mean_word_length': 2.8711484593837535, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '6811853', 'n_tokens_mistral': 411, 'n_tokens_neox': 402, 'n_words': 98}