"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const typeorm_1 = require("typeorm");
const entities_1 = require("../../../entities");
exports.createUser = {
    async createUser(_, { user: attrs }) {
        const repository = typeorm_1.getRepository(entities_1.User);
        return await repository.save(Object.assign({}, attrs, { password: entities_1.User.encode(attrs.password) }));
    }
};
//# sourceMappingURL=create-user.js.map