From 7bbad9eace928530df197b7242e0881c92174e1e Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Wed, 8 Nov 2023 14:39:08 +0900 Subject: [PATCH] Change internal deposit method to `PUT`. --- packages/fake-iamport-server/package.json | 2 +- .../src/api/functional/internal/index.ts | 4 ++-- .../src/controllers/FakeIamportInternalController.ts | 2 +- packages/fake-toss-payments-server/package.json | 2 +- .../src/api/functional/internal/index.ts | 4 ++-- .../src/controllers/FakeTossInternalController.ts | 2 +- packages/iamport-server-api/package.json | 2 +- packages/iamport-server-api/swagger.json | 8 ++++---- packages/payment-api/package.json | 6 +++--- packages/payment-api/swagger.json | 2 +- packages/payment-backend/package.json | 10 +++++----- .../payment-backend/src/services/toss/TossAsset.ts | 1 - packages/toss-payments-server-api/package.json | 2 +- packages/toss-payments-server-api/swagger.json | 8 ++++---- 14 files changed, 27 insertions(+), 28 deletions(-) diff --git a/packages/fake-iamport-server/package.json b/packages/fake-iamport-server/package.json index 6ec766f..4e7fbc4 100644 --- a/packages/fake-iamport-server/package.json +++ b/packages/fake-iamport-server/package.json @@ -1,6 +1,6 @@ { "name": "fake-iamport-server", - "version": "5.0.5", + "version": "5.0.6", "description": "Fake iamport server for testing", "main": "lib/index.js", "typings": "lib/index.d.ts", diff --git a/packages/fake-iamport-server/src/api/functional/internal/index.ts b/packages/fake-iamport-server/src/api/functional/internal/index.ts index e0567a6..1f70d07 100644 --- a/packages/fake-iamport-server/src/api/functional/internal/index.ts +++ b/packages/fake-iamport-server/src/api/functional/internal/index.ts @@ -104,7 +104,7 @@ export namespace webhook { * @author Samchon * * @controller FakeIamportInternalController.deposit - * @path GET /internal/deposit/:imp_uid + * @path PUT /internal/deposit/:imp_uid * @nestia Generated by Nestia - https://github.com/samchon/nestia */ export async function deposit( @@ -127,7 +127,7 @@ export async function deposit( export namespace deposit { export const METADATA = { - method: "GET", + method: "PUT", path: "/internal/deposit/:imp_uid", request: null, response: { diff --git a/packages/fake-iamport-server/src/controllers/FakeIamportInternalController.ts b/packages/fake-iamport-server/src/controllers/FakeIamportInternalController.ts index 805c084..c2ba3ed 100644 --- a/packages/fake-iamport-server/src/controllers/FakeIamportInternalController.ts +++ b/packages/fake-iamport-server/src/controllers/FakeIamportInternalController.ts @@ -46,7 +46,7 @@ export class FakeIamportInternalController { * @security bearer * @author Samchon */ - @core.TypedRoute.Get("deposit/:imp_uid") + @core.TypedRoute.Put("deposit/:imp_uid") public deposit( @nest.Request() request: fastify.FastifyRequest, @core.TypedParam("imp_uid") imp_uid: string, diff --git a/packages/fake-toss-payments-server/package.json b/packages/fake-toss-payments-server/package.json index 30dfcf8..11b5ee9 100644 --- a/packages/fake-toss-payments-server/package.json +++ b/packages/fake-toss-payments-server/package.json @@ -1,6 +1,6 @@ { "name": "fake-toss-payments-server", - "version": "5.0.5", + "version": "5.0.6", "description": "Fake toss-payments server for testing", "main": "lib/index.js", "typings": "lib/index.d.ts", diff --git a/packages/fake-toss-payments-server/src/api/functional/internal/index.ts b/packages/fake-toss-payments-server/src/api/functional/internal/index.ts index 0ee4777..0adf00f 100644 --- a/packages/fake-toss-payments-server/src/api/functional/internal/index.ts +++ b/packages/fake-toss-payments-server/src/api/functional/internal/index.ts @@ -106,7 +106,7 @@ export namespace webhook { * @author Samchon * * @controller FakeTossInternalController.deposit - * @path GET /internal/:paymentKey/deposit + * @path PUT /internal/:paymentKey/deposit * @nestia Generated by Nestia - https://github.com/samchon/nestia */ export async function deposit( @@ -130,7 +130,7 @@ export namespace deposit { export type Output = Primitive; export const METADATA = { - method: "GET", + method: "PUT", path: "/internal/:paymentKey/deposit", request: null, response: { diff --git a/packages/fake-toss-payments-server/src/controllers/FakeTossInternalController.ts b/packages/fake-toss-payments-server/src/controllers/FakeTossInternalController.ts index c2b588e..4d88466 100644 --- a/packages/fake-toss-payments-server/src/controllers/FakeTossInternalController.ts +++ b/packages/fake-toss-payments-server/src/controllers/FakeTossInternalController.ts @@ -50,7 +50,7 @@ export class FakeTossInternalController { * @security basic * @author Samchon */ - @core.TypedRoute.Get(":paymentKey/deposit") + @core.TypedRoute.Put(":paymentKey/deposit") public deposit( @nest.Request() request: fastify.FastifyRequest, @core.TypedParam("paymentKey") paymentKey: string, diff --git a/packages/iamport-server-api/package.json b/packages/iamport-server-api/package.json index ffb6271..c7f6a8d 100644 --- a/packages/iamport-server-api/package.json +++ b/packages/iamport-server-api/package.json @@ -1,6 +1,6 @@ { "name": "iamport-server-api", - "version": "5.0.5", + "version": "5.0.6", "description": "API for Iamport Server", "main": "lib/index.js", "typings": "lib/index.d.ts", diff --git a/packages/iamport-server-api/swagger.json b/packages/iamport-server-api/swagger.json index 58fb511..08188b7 100644 --- a/packages/iamport-server-api/swagger.json +++ b/packages/iamport-server-api/swagger.json @@ -13,7 +13,7 @@ "info": { "title": "Iamport API", "description": "Built by [fake-iamport-server](https://github.com/samchon/payments/tree/master/packages/fake-iamport-server) with [nestia](https://github.com/samchon/nestia)", - "version": "5.0.5", + "version": "5.0.6", "license": { "name": "MIT" } @@ -498,7 +498,7 @@ } }, "/internal/deposit/{imp_uid}": { - "get": { + "put": { "tags": [], "parameters": [ { @@ -512,7 +512,7 @@ } ], "responses": { - "200": { + "201": { "description": "", "x-nestia-encrypted": false } @@ -574,7 +574,7 @@ ] } ], - "x-nestia-method": "GET" + "x-nestia-method": "PUT" } }, "/payments/{imp_uid}": { diff --git a/packages/payment-api/package.json b/packages/payment-api/package.json index 9db7a1b..34c7c36 100644 --- a/packages/payment-api/package.json +++ b/packages/payment-api/package.json @@ -1,6 +1,6 @@ { "name": "@samchon/payment-api", - "version": "5.0.5", + "version": "5.0.6", "description": "API for Payment Backend", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -35,8 +35,8 @@ }, "dependencies": { "@nestia/fetcher": "^2.3.4", - "iamport-server-api": "^5.0.5", - "toss-payments-server-api": "^5.0.5", + "iamport-server-api": "^5.0.6", + "toss-payments-server-api": "^5.0.6", "typia": "^5.2.4" } } \ No newline at end of file diff --git a/packages/payment-api/swagger.json b/packages/payment-api/swagger.json index 6551af3..d0c9592 100644 --- a/packages/payment-api/swagger.json +++ b/packages/payment-api/swagger.json @@ -7,7 +7,7 @@ } ], "info": { - "version": "5.0.5", + "version": "5.0.6", "title": "@samchon/payment-backend", "description": "Payment Backend Server", "license": { diff --git a/packages/payment-backend/package.json b/packages/payment-backend/package.json index dbd5656..23e2b71 100644 --- a/packages/payment-backend/package.json +++ b/packages/payment-backend/package.json @@ -1,6 +1,6 @@ { "name": "@samchon/payment-backend", - "version": "5.0.5", + "version": "5.0.6", "description": "Payment Backend Server", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -65,14 +65,14 @@ "@typescript-eslint/parser": "^5.26.0", "cli": "^1.0.1", "copyfiles": "^2.4.1", - "iamport-server-api": "^5.0.5", + "iamport-server-api": "^5.0.6", "nestia": "^5.0.1", "pm2": "^4.5.6", "prettier": "^2.6.2", "prisma-markdown": "^1.0.6", "rimraf": "^3.0.2", "sloc": "^0.2.1", - "toss-payments-server-api": "^5.0.5", + "toss-payments-server-api": "^5.0.6", "ts-node": "^10.9.1", "ts-patch": "^3.0.2", "typescript": "^5.2.2", @@ -84,8 +84,8 @@ "bcryptjs": "^2.4.3", "dotenv": "^16.3.1", "dotenv-expand": "^10.0.0", - "fake-iamport-server": "^5.0.5", - "fake-toss-payments-server": "^5.0.5", + "fake-iamport-server": "^5.0.6", + "fake-toss-payments-server": "^5.0.6", "git-last-commit": "^1.0.0", "inquirer": "^8.2.5", "mutex-server": "^0.3.1", diff --git a/packages/payment-backend/src/services/toss/TossAsset.ts b/packages/payment-backend/src/services/toss/TossAsset.ts index da6ab9d..6cdeac4 100644 --- a/packages/payment-backend/src/services/toss/TossAsset.ts +++ b/packages/payment-backend/src/services/toss/TossAsset.ts @@ -21,7 +21,6 @@ export namespace TossAsset { host, headers: { Authorization: `Basic ${token}`, - "Content-Type": "application/json", }, }; } diff --git a/packages/toss-payments-server-api/package.json b/packages/toss-payments-server-api/package.json index 7951c31..fe03ab9 100644 --- a/packages/toss-payments-server-api/package.json +++ b/packages/toss-payments-server-api/package.json @@ -1,6 +1,6 @@ { "name": "toss-payments-server-api", - "version": "5.0.5", + "version": "5.0.6", "description": "API for Toss Payments Server", "main": "lib/index.js", "typings": "lib/index.d.ts", diff --git a/packages/toss-payments-server-api/swagger.json b/packages/toss-payments-server-api/swagger.json index fd303c1..65fae13 100644 --- a/packages/toss-payments-server-api/swagger.json +++ b/packages/toss-payments-server-api/swagger.json @@ -13,7 +13,7 @@ "info": { "title": "Toss Payments API", "description": "Built by [fake-toss-payments-server](https://github.com/samchon/payments/tree/master/packages/toss-payments-server-api) with [nestia](https://github.com/samchon/nestia)", - "version": "5.0.5", + "version": "5.0.6", "license": { "name": "MIT" } @@ -644,7 +644,7 @@ } }, "/internal/{paymentKey}/deposit": { - "get": { + "put": { "tags": [], "parameters": [ { @@ -658,7 +658,7 @@ } ], "responses": { - "200": { + "201": { "description": "입금 완료된 가상 꼐좌 결제 정보", "content": { "application/json": { @@ -743,7 +743,7 @@ ] } ], - "x-nestia-method": "GET" + "x-nestia-method": "PUT" } }, "/v1/payments/{paymentKey}": {