@chevre/domain
Version:
Chevre Domain Library for Node.js
29 lines (28 loc) • 1.49 kB
JavaScript
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.call = call;
const action_1 = require("../../repo/action");
const potentialAction_1 = require("../../repo/potentialAction");
const setting_1 = require("../../repo/setting");
const notification_1 = require("../notification");
/**
* タスク実行関数
*/
function call(params) {
return (_a) => __awaiter(this, [_a], void 0, function* ({ connection }) {
yield (0, notification_1.triggerWebhook)(Object.assign(Object.assign({}, params.data), { project: { id: params.project.id } }))({
action: new action_1.ActionRepo(connection),
potentialAction: new potentialAction_1.PotentialActionRepo(connection),
setting: new setting_1.SettingRepo(connection)
});
});
}
;