feat: implement Migration module with controller, service, and entity, including migration creation logic
This commit is contained in:
@ -1,4 +1,15 @@
|
||||
import { Controller } from "@nestjs/common";
|
||||
import { Body, Controller, Post } from "@nestjs/common";
|
||||
import { MigrationService } from "./migration.service";
|
||||
import { MigrationTable } from "./migration.constants";
|
||||
|
||||
@Controller("migrations")
|
||||
export class MigrationController {}
|
||||
export class MigrationController {
|
||||
constructor(private readonly migrationService: MigrationService) {}
|
||||
|
||||
@Post("create")
|
||||
async createMigration(
|
||||
@Body() body: { token: string; tables: MigrationTable[] }
|
||||
) {
|
||||
return await this.migrationService.create(body.tables, body.token);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user