Merge branch 'feature/auth-configure' of https://github.com/IT-Lab-KubSU/platform into feature/auth-configure

feature/auth-configure
AlexBarmen 1 year ago
commit 327767169b

@ -1,4 +1,6 @@
import { Global, Module } from "@nestjs/common"; import { Global, Module } from "@nestjs/common";
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
import { PrismaService } from "./service/prisma.service"; import { PrismaService } from "./service/prisma.service";
@Global() @Global()

@ -1,8 +1,8 @@
import { INestApplication, Injectable, OnModuleInit } from "@nestjs/common"; import { INestApplication, Injectable, OnModuleInit } from "@nestjs/common";
import { PrismaClient } from "@prisma/client"; import { AuthClient } from "@platform/prisma-clients";
@Injectable() @Injectable()
export class PrismaService extends PrismaClient implements OnModuleInit { export class PrismaService extends AuthClient implements OnModuleInit {
async onModuleInit() { async onModuleInit() {
await this.$connect(); await this.$connect();
} }

@ -1,5 +1,5 @@
import { Body, Controller, HttpCode, Inject, Post, UseInterceptors } from "@nestjs/common"; import { Body, Controller, HttpCode, Inject, Post, UseInterceptors } from "@nestjs/common";
import { EmailFindUniqueArgs, EmailFindFirstArgs, EmailFindManyArgs, EmailUpdateArgs, EmailCountArgs, EmailCreateArgs, EmailDeleteArgs, Email } from "@platform/prisma-clients/user-data"; import { Prisma, Email } from "@platform/prisma-clients/user-data";
import { EmailService } from "./service/email.service"; import { EmailService } from "./service/email.service";
import { PrismaErrorInterceptor } from "../prisma/interceptor/prisma-error.interceptor"; import { PrismaErrorInterceptor } from "../prisma/interceptor/prisma-error.interceptor";
@ -11,43 +11,43 @@ export class EmailController {
@Post("find/unique") @Post("find/unique")
@HttpCode(200) @HttpCode(200)
async FindUnique(@Body() emailFindUniqueArgs: EmailFindUniqueArgs): Promise<Partial<Email> | null> { async FindUnique(@Body() emailFindUniqueArgs: Prisma.EmailFindUniqueArgs): Promise<Partial<Email> | null> {
return await this.email.FindUnique(emailFindUniqueArgs); return await this.email.FindUnique(emailFindUniqueArgs);
} }
@Post("find/first") @Post("find/first")
@HttpCode(200) @HttpCode(200)
async FindFirst(@Body() emailFindFirstArgs: EmailFindFirstArgs): Promise<Partial<Email> | null> { async FindFirst(@Body() emailFindFirstArgs: Prisma.EmailFindFirstArgs): Promise<Partial<Email> | null> {
return await this.email.FindFirst(emailFindFirstArgs); return await this.email.FindFirst(emailFindFirstArgs);
} }
@Post("find/many") @Post("find/many")
@HttpCode(200) @HttpCode(200)
async FindMany(@Body() emailFindManyArgs: EmailFindManyArgs): Promise<Partial<Email>[]> { async FindMany(@Body() emailFindManyArgs: Prisma.EmailFindManyArgs): Promise<Partial<Email>[]> {
return await this.email.FindMany(emailFindManyArgs); return await this.email.FindMany(emailFindManyArgs);
} }
@Post("update") @Post("update")
@HttpCode(200) @HttpCode(200)
async Update(@Body() emailUpdateArgs: EmailUpdateArgs): Promise<Partial<Email>> { async Update(@Body() emailUpdateArgs: Prisma.EmailUpdateArgs): Promise<Partial<Email>> {
return await this.email.Update(emailUpdateArgs); return await this.email.Update(emailUpdateArgs);
} }
@Post("count") @Post("count")
@HttpCode(200) @HttpCode(200)
async Count(@Body() emailCountArgs: EmailCountArgs): Promise<number> { async Count(@Body() emailCountArgs: Prisma.EmailCountArgs): Promise<number> {
return await this.email.Count(emailCountArgs); return await this.email.Count(emailCountArgs);
} }
@Post("create") @Post("create")
@HttpCode(200) @HttpCode(200)
async Create(@Body() emailCreateArgs: EmailCreateArgs): Promise<Partial<Email>> { async Create(@Body() emailCreateArgs: Prisma.EmailCreateArgs): Promise<Partial<Email>> {
return await this.email.Create(emailCreateArgs); return await this.email.Create(emailCreateArgs);
} }
@Post("delete") @Post("delete")
@HttpCode(200) @HttpCode(200)
async Delete(@Body() emailDeleteArgs: EmailDeleteArgs): Promise<Partial<Email>> { async Delete(@Body() emailDeleteArgs: Prisma.EmailDeleteArgs): Promise<Partial<Email>> {
return await this.email.Delete(emailDeleteArgs); return await this.email.Delete(emailDeleteArgs);
} }
} }

@ -1,10 +1,6 @@
import { Inject, Injectable } from "@nestjs/common"; import { Inject, Injectable } from "@nestjs/common";
import { PrismaService } from '../../prisma/service/prisma.service'; import { PrismaService } from '../../prisma/service/prisma.service';
import { UserDataClient as Prisma } from "@platform/prisma-clients"; import { Email, Prisma } from "@platform/prisma-clients/user-data";
import { Email, EmailFindUniqueArgs,
EmailFindFirstArgs, EmailFindManyArgs, EmailUpdateArgs,
EmailCountArgs, EmailCreateArgs, EmailDeleteArgs
} from "@platform/prisma-clients/user-data";
import { PrismaClientKnownRequestError } from "@prisma/client/runtime"; import { PrismaClientKnownRequestError } from "@prisma/client/runtime";
import { UniqueConstraintFailedError } from "../../prisma/error/unique-constraint-failed.error"; import { UniqueConstraintFailedError } from "../../prisma/error/unique-constraint-failed.error";
import { RecordNotFoundError } from "../../prisma/error/record-not-found.error"; import { RecordNotFoundError } from "../../prisma/error/record-not-found.error";
@ -14,19 +10,19 @@ export class EmailService {
constructor(@Inject(PrismaService) private prisma: PrismaService) { constructor(@Inject(PrismaService) private prisma: PrismaService) {
} }
async FindUnique(emailFindUniqueArgs: EmailFindUniqueArgs): Promise<Partial<Email> | null> { async FindUnique(emailFindUniqueArgs: Prisma.EmailFindUniqueArgs): Promise<Partial<Email> | null> {
return await this.prisma.email.findUnique(emailFindUniqueArgs); return await this.prisma.email.findUnique(emailFindUniqueArgs);
} }
async FindFirst(emailFindFirstArgs: EmailFindFirstArgs): Promise<Partial<Email> | null> { async FindFirst(emailFindFirstArgs: Prisma.EmailFindFirstArgs): Promise<Partial<Email> | null> {
return await this.prisma.email.findFirst(emailFindFirstArgs); return await this.prisma.email.findFirst(emailFindFirstArgs);
} }
async FindMany(emailFindManyArgs: EmailFindManyArgs): Promise<Partial<Email>[]> { async FindMany(emailFindManyArgs: Prisma.EmailFindManyArgs): Promise<Partial<Email>[]> {
return await this.prisma.email.findMany(emailFindManyArgs); return await this.prisma.email.findMany(emailFindManyArgs);
} }
async Update(emailUpdateArgs: EmailUpdateArgs): Promise<Partial<Email>> { async Update(emailUpdateArgs: Prisma.EmailUpdateArgs): Promise<Partial<Email>> {
try { try {
return await this.prisma.email.update(emailUpdateArgs); return await this.prisma.email.update(emailUpdateArgs);
} catch (e) { } catch (e) {
@ -38,11 +34,11 @@ export class EmailService {
} }
} }
async Count(emailCountArgs: EmailCountArgs): Promise<number> { async Count(emailCountArgs: Prisma.EmailCountArgs): Promise<number> {
return await this.prisma.email.count(emailCountArgs); return await this.prisma.email.count(emailCountArgs);
} }
async Create(emailCreateArgs: EmailCreateArgs): Promise<Partial<Email>> { async Create(emailCreateArgs: Prisma.EmailCreateArgs): Promise<Partial<Email>> {
try { try {
return await this.prisma.email.create(emailCreateArgs); return await this.prisma.email.create(emailCreateArgs);
} catch (e) { } catch (e) {
@ -53,7 +49,7 @@ export class EmailService {
} }
} }
async Delete(emailDeleteArgs: EmailDeleteArgs): Promise<Partial<Email>> { async Delete(emailDeleteArgs: Prisma.EmailDeleteArgs): Promise<Partial<Email>> {
try { try {
return await this.prisma.email.delete(emailDeleteArgs); return await this.prisma.email.delete(emailDeleteArgs);
} catch (e) { } catch (e) {

@ -1,9 +1,5 @@
import { Body, Controller, HttpCode, Inject, Post, UseInterceptors } from "@nestjs/common"; import { Body, Controller, HttpCode, Inject, Post, UseInterceptors } from "@nestjs/common";
import { UserDataClient as Prisma } from "@platform/prisma-clients"; import { PhoneNumber, Prisma } from "@platform/prisma-clients/user-data";
import { PhoneNumber, PhoneNumberFindUniqueArgs,
PhoneNumberFindFirstArgs, PhoneNumberFindManyArgs, PhoneNumberUpdateArgs,
PhoneNumberCountArgs, PhoneNumberCreateArgs, PhoneNumberDeleteArgs
} from "@platform/prisma-clients/user-data";
import { PhoneNumberService } from "./service/phone-number.service"; import { PhoneNumberService } from "./service/phone-number.service";
import { PrismaErrorInterceptor } from "../prisma/interceptor/prisma-error.interceptor"; import { PrismaErrorInterceptor } from "../prisma/interceptor/prisma-error.interceptor";
@ -15,43 +11,43 @@ export class PhoneNumberController {
@Post("find/unique") @Post("find/unique")
@HttpCode(200) @HttpCode(200)
async FindUnique(@Body() phoneNumberFindUniqueArgs: PhoneNumberFindUniqueArgs): Promise<Partial<PhoneNumber> | null> { async FindUnique(@Body() phoneNumberFindUniqueArgs: Prisma.PhoneNumberFindUniqueArgs): Promise<Partial<PhoneNumber> | null> {
return await this.phoneNumber.FindUnique(phoneNumberFindUniqueArgs); return await this.phoneNumber.FindUnique(phoneNumberFindUniqueArgs);
} }
@Post("find/first") @Post("find/first")
@HttpCode(200) @HttpCode(200)
async FindFirst(@Body() phoneNumberFindFirstArgs: PhoneNumberFindFirstArgs): Promise<Partial<PhoneNumber> | null> { async FindFirst(@Body() phoneNumberFindFirstArgs: Prisma.PhoneNumberFindFirstArgs): Promise<Partial<PhoneNumber> | null> {
return await this.phoneNumber.FindFirst(phoneNumberFindFirstArgs); return await this.phoneNumber.FindFirst(phoneNumberFindFirstArgs);
} }
@Post("find/many") @Post("find/many")
@HttpCode(200) @HttpCode(200)
async FindMany(@Body() phoneNumberFindManyArgs: PhoneNumberFindManyArgs): Promise<Partial<PhoneNumber>[]> { async FindMany(@Body() phoneNumberFindManyArgs: Prisma.PhoneNumberFindManyArgs): Promise<Partial<PhoneNumber>[]> {
return await this.phoneNumber.FindMany(phoneNumberFindManyArgs); return await this.phoneNumber.FindMany(phoneNumberFindManyArgs);
} }
@Post("update") @Post("update")
@HttpCode(200) @HttpCode(200)
async Update(@Body() phoneNumberUpdateArgs: PhoneNumberUpdateArgs): Promise<Partial<PhoneNumber>> { async Update(@Body() phoneNumberUpdateArgs: Prisma.PhoneNumberUpdateArgs): Promise<Partial<PhoneNumber>> {
return await this.phoneNumber.Update(phoneNumberUpdateArgs); return await this.phoneNumber.Update(phoneNumberUpdateArgs);
} }
@Post("count") @Post("count")
@HttpCode(200) @HttpCode(200)
async Count(@Body() phoneNumberCountArgs: PhoneNumberCountArgs): Promise<number> { async Count(@Body() phoneNumberCountArgs: Prisma.PhoneNumberCountArgs): Promise<number> {
return await this.phoneNumber.Count(phoneNumberCountArgs); return await this.phoneNumber.Count(phoneNumberCountArgs);
} }
@Post("create") @Post("create")
@HttpCode(200) @HttpCode(200)
async Create(@Body() phoneNumberCreateArgs: PhoneNumberCreateArgs): Promise<Partial<PhoneNumber>> { async Create(@Body() phoneNumberCreateArgs: Prisma.PhoneNumberCreateArgs): Promise<Partial<PhoneNumber>> {
return await this.phoneNumber.Create(phoneNumberCreateArgs); return await this.phoneNumber.Create(phoneNumberCreateArgs);
} }
@Post("delete") @Post("delete")
@HttpCode(200) @HttpCode(200)
async Delete(@Body() phoneNumberDeleteArgs: PhoneNumberDeleteArgs): Promise<Partial<PhoneNumber>> { async Delete(@Body() phoneNumberDeleteArgs: Prisma.PhoneNumberDeleteArgs): Promise<Partial<PhoneNumber>> {
return await this.phoneNumber.Delete(phoneNumberDeleteArgs); return await this.phoneNumber.Delete(phoneNumberDeleteArgs);
} }
} }

@ -1,9 +1,6 @@
import { Inject, Injectable } from "@nestjs/common"; import { Inject, Injectable } from "@nestjs/common";
import { PrismaService } from "../../prisma/service/prisma.service"; import { PrismaService } from "../../prisma/service/prisma.service";
import { PhoneNumber, PhoneNumberFindUniqueArgs, import { PhoneNumber, Prisma } from "@platform/prisma-clients/user-data";
PhoneNumberFindFirstArgs, PhoneNumberFindManyArgs, PhoneNumberUpdateArgs,
PhoneNumberCountArgs, PhoneNumberCreateArgs, PhoneNumberDeleteArgs
} from "@platform/prisma-clients/user-data";
import { PrismaClientKnownRequestError } from "@prisma/client/runtime"; import { PrismaClientKnownRequestError } from "@prisma/client/runtime";
import { UniqueConstraintFailedError } from "../../prisma/error/unique-constraint-failed.error"; import { UniqueConstraintFailedError } from "../../prisma/error/unique-constraint-failed.error";
import { RecordNotFoundError } from "../../prisma/error/record-not-found.error"; import { RecordNotFoundError } from "../../prisma/error/record-not-found.error";
@ -13,19 +10,19 @@ export class PhoneNumberService {
constructor(@Inject(PrismaService) private prisma: PrismaService) { constructor(@Inject(PrismaService) private prisma: PrismaService) {
} }
async FindUnique(phoneNumberFindUniqueArgs: PhoneNumberFindUniqueArgs): Promise<Partial<PhoneNumber> | null> { async FindUnique(phoneNumberFindUniqueArgs: Prisma.PhoneNumberFindUniqueArgs): Promise<Partial<PhoneNumber> | null> {
return await this.prisma.phoneNumber.findUnique(phoneNumberFindUniqueArgs); return await this.prisma.phoneNumber.findUnique(phoneNumberFindUniqueArgs);
} }
async FindFirst(phoneNumberFindFirstArgs: PhoneNumberFindFirstArgs): Promise<Partial<PhoneNumber> | null> { async FindFirst(phoneNumberFindFirstArgs: Prisma.PhoneNumberFindFirstArgs): Promise<Partial<PhoneNumber> | null> {
return await this.prisma.phoneNumber.findFirst(phoneNumberFindFirstArgs); return await this.prisma.phoneNumber.findFirst(phoneNumberFindFirstArgs);
} }
async FindMany(phoneNumberFindManyArgs: PhoneNumberFindManyArgs): Promise<Partial<PhoneNumber>[]> { async FindMany(phoneNumberFindManyArgs: Prisma.PhoneNumberFindManyArgs): Promise<Partial<PhoneNumber>[]> {
return await this.prisma.phoneNumber.findMany(phoneNumberFindManyArgs); return await this.prisma.phoneNumber.findMany(phoneNumberFindManyArgs);
} }
async Update(phoneNumberUpdateArgs: PhoneNumberUpdateArgs): Promise<Partial<PhoneNumber>> { async Update(phoneNumberUpdateArgs: Prisma.PhoneNumberUpdateArgs): Promise<Partial<PhoneNumber>> {
try { try {
return await this.prisma.phoneNumber.update(phoneNumberUpdateArgs); return await this.prisma.phoneNumber.update(phoneNumberUpdateArgs);
} catch (e) { } catch (e) {
@ -37,11 +34,11 @@ export class PhoneNumberService {
} }
} }
async Count(phoneNumberCountArgs: PhoneNumberCountArgs): Promise<number> { async Count(phoneNumberCountArgs: Prisma.PhoneNumberCountArgs): Promise<number> {
return await this.prisma.phoneNumber.count(phoneNumberCountArgs); return await this.prisma.phoneNumber.count(phoneNumberCountArgs);
} }
async Create(phoneNumberCreateArgs: PhoneNumberCreateArgs): Promise<Partial<PhoneNumber>> { async Create(phoneNumberCreateArgs: Prisma.PhoneNumberCreateArgs): Promise<Partial<PhoneNumber>> {
try { try {
return await this.prisma.phoneNumber.create(phoneNumberCreateArgs); return await this.prisma.phoneNumber.create(phoneNumberCreateArgs);
} catch (e) { } catch (e) {
@ -52,7 +49,7 @@ export class PhoneNumberService {
} }
} }
async Delete(phoneNumberDeleteArgs: PhoneNumberDeleteArgs): Promise<Partial<PhoneNumber>> { async Delete(phoneNumberDeleteArgs: Prisma.PhoneNumberDeleteArgs): Promise<Partial<PhoneNumber>> {
try { try {
return await this.prisma.phoneNumber.delete(phoneNumberDeleteArgs); return await this.prisma.phoneNumber.delete(phoneNumberDeleteArgs);
} catch (e) { } catch (e) {

@ -1,9 +1,6 @@
import { Inject, Injectable } from "@nestjs/common"; import { Inject, Injectable } from "@nestjs/common";
import { PrismaService } from "../../prisma/service/prisma.service"; import { PrismaService } from "../../prisma/service/prisma.service";
import { User, UserFindUniqueArgs, import { User, Prisma } from "@platform/prisma-clients/user-data";
UserFindUniqueArgs, UserFindFirstArgs, UserFindManyArgs,
UserUpdateArgs, UserCountArgs, UserCreateArgs, UserDeleteArgs
} from "@platform/prisma-clients/user-data";
import { PrismaClientKnownRequestError } from "@prisma/client/runtime"; import { PrismaClientKnownRequestError } from "@prisma/client/runtime";
import { UniqueConstraintFailedError } from "../../prisma/error/unique-constraint-failed.error"; import { UniqueConstraintFailedError } from "../../prisma/error/unique-constraint-failed.error";
import { RecordNotFoundError } from "../../prisma/error/record-not-found.error"; import { RecordNotFoundError } from "../../prisma/error/record-not-found.error";
@ -13,19 +10,19 @@ export class UserService {
constructor(@Inject(PrismaService) private prisma: PrismaService) { constructor(@Inject(PrismaService) private prisma: PrismaService) {
} }
async FindUnique(userFindUniqueArgs: UserFindUniqueArgs): Promise<Partial<User> | null> { async FindUnique(userFindUniqueArgs: Prisma.UserFindUniqueArgs): Promise<Partial<User> | null> {
return await this.prisma.user.findUnique(userFindUniqueArgs); return await this.prisma.user.findUnique(userFindUniqueArgs);
} }
async FindFirst(userFindFirstArgs: UserFindFirstArgs): Promise<Partial<User> | null> { async FindFirst(userFindFirstArgs: Prisma.UserFindFirstArgs): Promise<Partial<User> | null> {
return await this.prisma.user.findFirst(userFindFirstArgs); return await this.prisma.user.findFirst(userFindFirstArgs);
} }
async FindMany(userFindManyArgs: UserFindManyArgs): Promise<Partial<User>[]> { async FindMany(userFindManyArgs: Prisma.UserFindManyArgs): Promise<Partial<User>[]> {
return await this.prisma.user.findMany(userFindManyArgs); return await this.prisma.user.findMany(userFindManyArgs);
} }
async Update(userUpdateArgs: UserUpdateArgs): Promise<Partial<User>> { async Update(userUpdateArgs: Prisma.UserUpdateArgs): Promise<Partial<User>> {
try { try {
return await this.prisma.user.update(userUpdateArgs); return await this.prisma.user.update(userUpdateArgs);
} catch (e) { } catch (e) {
@ -37,11 +34,11 @@ export class UserService {
} }
} }
async Count(userCountArgs: UserCountArgs): Promise<number> { async Count(userCountArgs: Prisma.UserCountArgs): Promise<number> {
return await this.prisma.user.count(userCountArgs); return await this.prisma.user.count(userCountArgs);
} }
async Create(userCreateArgs: UserCreateArgs): Promise<Partial<User>> { async Create(userCreateArgs: Prisma.UserCreateArgs): Promise<Partial<User>> {
try { try {
return await this.prisma.user.create(userCreateArgs); return await this.prisma.user.create(userCreateArgs);
} catch (e) { } catch (e) {
@ -52,7 +49,7 @@ export class UserService {
} }
} }
async Delete(userDeleteArgs: UserDeleteArgs): Promise<Partial<User>> { async Delete(userDeleteArgs: Prisma.UserDeleteArgs): Promise<Partial<User>> {
try { try {
return await this.prisma.user.delete(userDeleteArgs); return await this.prisma.user.delete(userDeleteArgs);
} catch (e) { } catch (e) {

@ -1,8 +1,5 @@
import { Body, Controller, HttpCode, Inject, Post, UseInterceptors } from "@nestjs/common"; import { Body, Controller, HttpCode, Inject, Post, UseInterceptors } from "@nestjs/common";
import { User, UserFindUniqueArgs, import { User, Prisma } from "@platform/prisma-clients/user-data";
UserFindUniqueArgs, UserFindFirstArgs, UserFindManyArgs,
UserUpdateArgs, UserCountArgs, UserCreateArgs, UserDeleteArgs
} from "@platform/prisma-clients/user-data";
import { UserService } from "./service/user.service"; import { UserService } from "./service/user.service";
import { PrismaErrorInterceptor } from "../prisma/interceptor/prisma-error.interceptor"; import { PrismaErrorInterceptor } from "../prisma/interceptor/prisma-error.interceptor";
@ -14,43 +11,43 @@ export class UserController {
@Post("find/unique") @Post("find/unique")
@HttpCode(200) @HttpCode(200)
async FindUnique(@Body() userFindUniqueArgs: UserFindUniqueArgs): Promise<Partial<User> | null> { async FindUnique(@Body() userFindUniqueArgs: Prisma.UserFindUniqueArgs): Promise<Partial<User> | null> {
return await this.user.FindUnique(userFindUniqueArgs); return await this.user.FindUnique(userFindUniqueArgs);
} }
@Post("find/first") @Post("find/first")
@HttpCode(200) @HttpCode(200)
async FindFirst(@Body() userFindFirstArgs: UserFindFirstArgs): Promise<Partial<User> | null> { async FindFirst(@Body() userFindFirstArgs: Prisma.UserFindFirstArgs): Promise<Partial<User> | null> {
return await this.user.FindFirst(userFindFirstArgs); return await this.user.FindFirst(userFindFirstArgs);
} }
@Post("find/many") @Post("find/many")
@HttpCode(200) @HttpCode(200)
async FindMany(@Body() userFindManyArgs: UserFindManyArgs): Promise<Partial<User>[]> { async FindMany(@Body() userFindManyArgs: Prisma.UserFindManyArgs): Promise<Partial<User>[]> {
return await this.user.FindMany(userFindManyArgs); return await this.user.FindMany(userFindManyArgs);
} }
@Post("update") @Post("update")
@HttpCode(200) @HttpCode(200)
async Update(@Body() userUpdateArgs: UserUpdateArgs): Promise<Partial<User>> { async Update(@Body() userUpdateArgs: Prisma.UserUpdateArgs): Promise<Partial<User>> {
return await this.user.Update(userUpdateArgs); return await this.user.Update(userUpdateArgs);
} }
@Post("count") @Post("count")
@HttpCode(200) @HttpCode(200)
async Count(@Body() userCountArgs: UserCountArgs): Promise<number> { async Count(@Body() userCountArgs: Prisma.UserCountArgs): Promise<number> {
return await this.user.Count(userCountArgs); return await this.user.Count(userCountArgs);
} }
@Post("create") @Post("create")
@HttpCode(200) @HttpCode(200)
async Create(@Body() userCreateArgs: UserCreateArgs): Promise<Partial<User>> { async Create(@Body() userCreateArgs: Prisma.UserCreateArgs): Promise<Partial<User>> {
return await this.user.Create(userCreateArgs); return await this.user.Create(userCreateArgs);
} }
@Post("delete") @Post("delete")
@HttpCode(200) @HttpCode(200)
async Delete(@Body() userDeleteArgs: UserDeleteArgs): Promise<Partial<User>> { async Delete(@Body() userDeleteArgs: Prisma.UserDeleteArgs): Promise<Partial<User>> {
return await this.user.Delete(userDeleteArgs); return await this.user.Delete(userDeleteArgs);
} }
} }

Loading…
Cancel
Save