-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from cdalton713/backend
Backend: implemented Update User and Update Ticket
- Loading branch information
Showing
16 changed files
with
297 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
import { IntersectionType } from '@nestjs/swagger'; | ||
import { Ticket } from './ticket.dto'; | ||
import { User } from 'src/user/dto/user.dto'; | ||
import { Device } from './device.dto'; | ||
import { TicketDTO } from './ticket.dto'; | ||
import { UserDTO } from 'src/user/dto/user.dto'; | ||
import { DeviceDTO } from './device.dto'; | ||
|
||
class TicketAndDevice extends IntersectionType(Ticket, Device) {} | ||
class TicketAndDeviceDTO extends IntersectionType(TicketDTO, DeviceDTO) {} | ||
|
||
export class Combined extends IntersectionType(TicketAndDevice, User) {} | ||
export class CombinedDTO extends IntersectionType( | ||
TicketAndDeviceDTO, | ||
UserDTO, | ||
) {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
import { IntersectionType, OmitType as Omit } from '@nestjs/swagger'; | ||
import { CreateUser } from 'src/user/dto/create-user.dto'; | ||
import { CreateTicket } from './create-ticket.dto'; | ||
import { CreateDevice } from './create-device.dto'; | ||
import { CreateUserDTO } from 'src/user/dto/create-user.dto'; | ||
import { CreateTicketDTO } from './create-ticket.dto'; | ||
import { CreateDeviceDTO } from './create-device.dto'; | ||
|
||
class createTicketAndDevice extends IntersectionType( | ||
CreateTicket, | ||
Omit(CreateDevice, ['ticket_id']), | ||
class createTicketAndDeviceDTO extends IntersectionType( | ||
CreateTicketDTO, | ||
Omit(CreateDeviceDTO, ['ticket_id']), | ||
) {} | ||
|
||
export class CreateCombined extends IntersectionType( | ||
createTicketAndDevice, | ||
Omit(CreateUser, ['admin']), | ||
export class CreateCombinedDTO extends IntersectionType( | ||
createTicketAndDeviceDTO, | ||
Omit(CreateUserDTO, ['admin']), | ||
) {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { OmitType as Omit } from '@nestjs/swagger'; | ||
import { Device } from './device.dto'; | ||
import { DeviceDTO } from './device.dto'; | ||
|
||
export class CreateDevice extends Omit(Device, ['device_id']) {} | ||
export class CreateDeviceDTO extends Omit(DeviceDTO, ['device_id']) {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
import { Ticket } from './ticket.dto'; | ||
import { TicketDTO } from './ticket.dto'; | ||
import { OmitType as Omit } from '@nestjs/swagger'; | ||
|
||
export class CreateTicket extends Omit(Ticket, ['ticket_id', 'status']) {} | ||
export class CreateTicketDTO extends Omit(TicketDTO, [ | ||
'ticket_id', | ||
'status', | ||
'submission_date', | ||
]) {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
import { PartialType } from '@nestjs/swagger'; | ||
import { Ticket } from './ticket.dto'; | ||
import { CreateTicketDTO } from './create-ticket.dto'; | ||
import { TicketDTO } from './ticket.dto'; | ||
import { OmitType as Omit } from '@nestjs/swagger'; | ||
|
||
export class UpdateTicketDto extends PartialType(Ticket) {} | ||
export class UpdateTicketDto extends Omit(TicketDTO, [ | ||
'ticket_id', | ||
'submission_date', | ||
'lsu_id', | ||
]) {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.