From 8d34717895058b422b21bafb69c3948b18341e5e Mon Sep 17 00:00:00 2001 From: Jnnsu Date: Tue, 14 May 2024 18:44:51 +0900 Subject: [PATCH] =?UTF-8?q?Feat:=20=EA=B2=B0=EC=A0=9C=20=EB=82=B4=EC=97=AD?= =?UTF-8?q?=20=EC=A1=B0=ED=9A=8C=20admin=20=EA=B0=80=EB=93=9C=20=EC=82=AD?= =?UTF-8?q?=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prisma/migrations/20240512070833_/migration.sql | 7 ------- prisma/migrations/20240512105229_/migration.sql | 2 -- prisma/migrations/20240512131417_/migration.sql | 16 ---------------- prisma/migrations/20240513074535_/migration.sql | 2 -- prisma/migrations/20240514094010_/migration.sql | 14 ++++++++++++++ src/payments/payments.controller.ts | 2 -- 6 files changed, 14 insertions(+), 29 deletions(-) delete mode 100644 prisma/migrations/20240512070833_/migration.sql delete mode 100644 prisma/migrations/20240512105229_/migration.sql delete mode 100644 prisma/migrations/20240512131417_/migration.sql delete mode 100644 prisma/migrations/20240513074535_/migration.sql create mode 100644 prisma/migrations/20240514094010_/migration.sql diff --git a/prisma/migrations/20240512070833_/migration.sql b/prisma/migrations/20240512070833_/migration.sql deleted file mode 100644 index 90e070a..0000000 --- a/prisma/migrations/20240512070833_/migration.sql +++ /dev/null @@ -1,7 +0,0 @@ --- CreateTable -CREATE TABLE `AccumulatedAmount` ( - `id` INTEGER NOT NULL AUTO_INCREMENT, - `amount` INTEGER NOT NULL, - - PRIMARY KEY (`id`) -) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; diff --git a/prisma/migrations/20240512105229_/migration.sql b/prisma/migrations/20240512105229_/migration.sql deleted file mode 100644 index d37cc67..0000000 --- a/prisma/migrations/20240512105229_/migration.sql +++ /dev/null @@ -1,2 +0,0 @@ --- AlterTable -ALTER TABLE `Plan` MODIFY `type` ENUM('BASIC', 'PREMIUM', 'EVENT') NOT NULL; diff --git a/prisma/migrations/20240512131417_/migration.sql b/prisma/migrations/20240512131417_/migration.sql deleted file mode 100644 index 33a841f..0000000 --- a/prisma/migrations/20240512131417_/migration.sql +++ /dev/null @@ -1,16 +0,0 @@ -/* - Warnings: - - - You are about to drop the `AccumulatedAmount` table. If the table is not empty, all the data it contains will be lost. - -*/ --- DropTable -DROP TABLE `AccumulatedAmount`; - --- CreateTable -CREATE TABLE `EventAmount` ( - `id` INTEGER NOT NULL AUTO_INCREMENT, - `amount` INTEGER NOT NULL, - - PRIMARY KEY (`id`) -) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; diff --git a/prisma/migrations/20240513074535_/migration.sql b/prisma/migrations/20240513074535_/migration.sql deleted file mode 100644 index 7599794..0000000 --- a/prisma/migrations/20240513074535_/migration.sql +++ /dev/null @@ -1,2 +0,0 @@ --- AlterTable -ALTER TABLE `EventAmount` ADD COLUMN `createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3); diff --git a/prisma/migrations/20240514094010_/migration.sql b/prisma/migrations/20240514094010_/migration.sql new file mode 100644 index 0000000..5ec484c --- /dev/null +++ b/prisma/migrations/20240514094010_/migration.sql @@ -0,0 +1,14 @@ +-- AlterTable +ALTER TABLE `Plan` MODIFY `type` ENUM('BASIC', 'PREMIUM', 'EVENT') NOT NULL; + +-- AlterTable +ALTER TABLE `User` ADD COLUMN `imageUrl` VARCHAR(191) NULL; + +-- CreateTable +CREATE TABLE `EventAmount` ( + `id` INTEGER NOT NULL AUTO_INCREMENT, + `amount` INTEGER NOT NULL, + `createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), + + PRIMARY KEY (`id`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; diff --git a/src/payments/payments.controller.ts b/src/payments/payments.controller.ts index 24d716a..558bac4 100644 --- a/src/payments/payments.controller.ts +++ b/src/payments/payments.controller.ts @@ -14,7 +14,6 @@ import { ApiBearerAuth, ApiBody, ApiTags } from '@nestjs/swagger'; import { JwtAuthGuard } from './../auth/jwt-auth-guard'; import { UpdateSubscriptionDto } from '../dto/updateSubscription.dto'; import { CancelPaymentDto } from '../dto/cancelPayment.dto'; -import { AdminGuard } from '../auth/admin-guard'; @UseGuards(JwtAuthGuard) @ApiBearerAuth('accessToken') @@ -54,7 +53,6 @@ export class PaymentsController { } @Get('plan/:planId') - @UseGuards(AdminGuard) getPaymentsByPlanId(@Param('planId') planId: string) { return this.paymentsService.getPaymentsByPlanId(planId); }