diff --git a/src/app.ts b/src/app.ts index 55e6c4fc..565cb46f 100644 --- a/src/app.ts +++ b/src/app.ts @@ -28,7 +28,7 @@ async function main() { origin: "*", }), ); - app.use(express.json({limit: "50mb"})); + app.use(express.json({ limit: "50mb" })); app.use(express.urlencoded({ extended: true, limit: "50mb" })); app.use(logMiddleware); app.use("/", express.static("static")); @@ -57,7 +57,6 @@ async function main() { try { const commandController = new CommandController(); await commandController.cronjobCommand(); - await commandController.cronjobTest(); } catch (error) { console.error("Error executing function from controller:", error); } diff --git a/src/controllers/CommandController.ts b/src/controllers/CommandController.ts index 97fdb66b..eb8201a4 100644 --- a/src/controllers/CommandController.ts +++ b/src/controllers/CommandController.ts @@ -7115,19 +7115,4 @@ export class CommandController extends Controller { }, }); } - - async cronjobTest(@Request() request?: RequestWithUser) { - const gender = { - name: "เพศทางเลือก", - code: "M", - isActive: true, - createdFullName: "system", - createdAt: new Date(), - updatedAt: new Date(), - }; - - await this.genderRepo.save(gender); - - return new HttpSuccess(); - } }