Added Events

This commit is contained in:
2026-01-30 14:35:01 +01:00
parent e2335fdcf7
commit 76857b8611
6 changed files with 31 additions and 13 deletions

View File

@@ -1,7 +1,7 @@
import { Controller, Get, Inject, Injectable } from '@nestjs/common';
import { Query } from '@nestjs/graphql';
import { MyEvent } from 'src/dto/event.dto';
import { EventsService } from './events.service';
import { EventEntity } from './events.entity';
@Controller('/api/events')
export class EventsController {
@@ -14,8 +14,8 @@ export class EventsController {
){}
@Get("/")
@Query(()=>[MyEvent])
async events(): Promise<MyEvent[]>{
@Query(()=>[EventEntity])
async events(): Promise<EventEntity[]>{
return await this.eventsService.getEvents();