Ejemplo n.º 1
0
func addProcessParentHelper(cmd m.AddProcessCommand) Response {

	logger := log.New("main")
	logger.Info("Add ProcessForCurrentOrg111", cmd.OrgId)
	query := m.AddProcessCommand{}

	query.OrgId = cmd.OrgId
	query.ProcessName = cmd.ProcessName
	query.UpdatedBy = cmd.UpdatedBy

	if err := bus.Dispatch(&query); err != nil {
		return ApiError(500, "Could not add process to organization", err)
	}

	return ApiSuccess("Process Sucessfully added ")

}
Ejemplo n.º 2
0
// POST /api/process
func AddProcessToCurrentOrg(c *middleware.Context, cmd m.AddProcessCommand) Response {

	logger := log.New("main")
	logger.Info("Add ProcessForCurrentOrg", c.OrgId)
	cmd.OrgId = c.OrgId

	return addProcessHelper(cmd)
}
Ejemplo n.º 3
0
// POST /api/process/:orgId
func AddProcess(c *middleware.Context, cmd m.AddProcessCommand) Response {
	cmd.OrgId = c.OrgId
	return addProcessParentHelper(cmd)
}