Added Event Module

This commit is contained in:
2026-01-30 11:44:54 +01:00
parent 1948ce58d3
commit e2335fdcf7
11 changed files with 192 additions and 30 deletions

View File

@@ -0,0 +1,22 @@
import { Inject, Injectable } from '@nestjs/common';
import { MyEvent } from 'src/dto/event.dto';
import { Repository } from 'typeorm';
import { EventEntity } from './events.entity';
import { InjectRepository } from '@nestjs/typeorm';
@Injectable()
export class EventsService {
constructor(
@InjectRepository(EventEntity)
private readonly eventRepository: Repository<EventEntity>
){}
async getEvents(): Promise<MyEvent[]> {
return (await this.eventRepository.find()) as MyEvent[];
}
}