main
Some checks failed
Backend Deploy 🚀 / build-and-deploy (push) Has been cancelled

This commit is contained in:
Harun CAN
2026-03-14 14:01:01 +03:00
parent 0fefbe6859
commit dee6e29cfd
37 changed files with 1925 additions and 157 deletions

19
test-api.ts Normal file
View File

@@ -0,0 +1,19 @@
// test-api.ts
import { NestFactory } from '@nestjs/core';
import { AppModule } from './src/app.module';
import { MasterContentService } from './src/modules/content/services/master-content.service';
async function bootstrap() {
const app = await NestFactory.createApplicationContext(AppModule);
const masterContentService = app.get(MasterContentService);
// Fetch a known master ID from the DB
const id = '80c71d39-4614-426c-9d9a-e5b2301cdebd';
const data = await masterContentService.getById(id);
console.log("Returned data type:", typeof data);
console.log("Has contents?", Array.isArray(data?.contents));
console.log("Contents array:", data?.contents?.map(c => ({ id: c.id, type: c.type, title: c.title })));
await app.close();
}
bootstrap();