mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
- Added ManualAPI for manually triggering workflows via GET and POST requests. - Introduced WorkflowAPI for updating workflows with authorization checks. - Created documentation for JavaScript and Webhook components. - Established WorkflowFeatureSet to initialize routing and job processing. - Developed QueueWorkflow service for managing workflow queue operations. - Implemented RunWorkflow service to execute workflows with error handling and logging. - Added utility for loading component metadata dynamically.
34 lines
977 B
TypeScript
34 lines
977 B
TypeScript
import DataMigrationBase from "./DataMigrationBase";
|
|
import ObjectID from "Common/Types/ObjectID";
|
|
import GlobalConfigService from "Common/Server/Services/GlobalConfigService";
|
|
import GlobalConfig, {
|
|
EmailServerType,
|
|
} from "Common/Models/DatabaseModels/GlobalConfig";
|
|
|
|
export default class AddDefaultGlobalConfig extends DataMigrationBase {
|
|
public constructor() {
|
|
super("AddDefaultGlobalConfig");
|
|
}
|
|
|
|
public override async migrate(): Promise<void> {
|
|
// get all the users with email isVerified true.
|
|
|
|
const globalConfig: GlobalConfig = new GlobalConfig();
|
|
globalConfig.id = ObjectID.getZeroObjectID();
|
|
globalConfig.emailServerType = EmailServerType.CustomSMTP;
|
|
globalConfig.sendgridFromName = "OneUptime";
|
|
globalConfig.smtpFromName = "OneUptime";
|
|
|
|
await GlobalConfigService.create({
|
|
data: globalConfig,
|
|
props: {
|
|
isRoot: true,
|
|
},
|
|
});
|
|
}
|
|
|
|
public override async rollback(): Promise<void> {
|
|
return;
|
|
}
|
|
}
|