UNPKG

@chevre/domain

Version:

Chevre Domain Library for Node.js

30 lines (29 loc) 1.53 kB
"use strict"; 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 message_1 = require("../../repo/message"); const project_1 = require("../../repo/project"); const notification_1 = require("../notification"); /** * タスク実行関数 */ function call(params) { return (_a) => __awaiter(this, [_a], void 0, function* ({ connection, credentials }) { yield (0, notification_1.sendEmailMessage)(Object.assign(Object.assign({}, params.data.actionAttributes), { sameAs: { id: params.id } // タスクIDを関連付け(2024-06-25~) }))({ action: new action_1.ActionRepo(connection), message: new message_1.MessageRepo(connection), project: new project_1.ProjectRepo(connection) }, credentials); }); }