Added Events
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user