<commit_before>
"use strict";

class CreateController {
};

export {CreateController};
<commit_msg>implement this, but am now thinking a generic CrudController might be better?<commit_after>
"use strict";

import {DataController} from './DataController';

class CreateController extends DataController {

    constructor(...args) {
        super(args);
        this.item = this.manager.constructor.Model;
    }

    create(item) {
        let result;
        if (result = this.manager.create(item)) {
            result.success(this.reload);
        }
    }

};

export {CreateController};

{'fraction_non_alphanumeric': 0.1152542372881356, 'fraction_numerical': 0.0, 'mean_word_length': 3.1041666666666665, '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': '3813431', 'n_tokens_mistral': 166, 'n_tokens_neox': 164, 'n_words': 42}