-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
399 additions
and
63 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
### | ||
POST http://localhost:3000/articles | ||
Content-Type: application/json | ||
|
||
{ | ||
"title":"갤럭시 S40", | ||
"content":"쌈송에서 만든 최신 폰" | ||
} | ||
|
||
### | ||
PATCH http://localhost:3000/articles/0456b46f-7a18-4211-b7a1-2216f84cc2cb | ||
Content-Type: application/json | ||
|
||
{ | ||
"content":"쌈송에서 만든 망폰" | ||
} | ||
|
||
### | ||
GET http://localhost:3000/articles/0456b46f-7a18-4211-b7a1-2216f84cc2cb | ||
|
||
### | ||
GET http://localhost:3000/articles | ||
|
||
### | ||
POST http://localhost:3000/articles/0456b46f-7a18-4211-b7a1-2216f84cc2cb/comments | ||
Content-Type: application/json | ||
|
||
{ | ||
"content" : "이건 삭제할 댓글입니다." | ||
} | ||
|
||
### | ||
DELETE http://localhost:3000/comments/cdd15137-d60a-4f58-8b71-398d802cdaa7 |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
|
||
PATCH http://localhost:3000/comments/492cc17e-ae41-4156-9a33-748f76adb7c4 | ||
Content-Type: application/json | ||
|
||
{ | ||
"content":"댓글 수정 테스트" | ||
} | ||
|
||
### | ||
GET http://localhost:3000/products/comments | ||
|
||
### | ||
GET http://localhost:3000/products/comments?limit=3&cursor=8cbf2c41-8974-412e-8d43-98d4020a7217 | ||
|
||
### | ||
GET http://localhost:3000/ariticles/comments |
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 was deleted.
Oops, something went wrong.
11 changes: 11 additions & 0 deletions
11
prisma/migrations/20241207164031_del_article_comment_relations/migration.sql
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* | ||
Warnings: | ||
- You are about to drop the column `articleId` on the `Comment` table. All the data in the column will be lost. | ||
*/ | ||
-- DropForeignKey | ||
ALTER TABLE "Comment" DROP CONSTRAINT "Comment_articleId_fkey"; | ||
|
||
-- AlterTable | ||
ALTER TABLE "Comment" DROP COLUMN "articleId"; |
11 changes: 11 additions & 0 deletions
11
prisma/migrations/20241207164132_add_article_comment_relations/migration.sql
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* | ||
Warnings: | ||
- Added the required column `articleId` to the `Comment` table without a default value. This is not possible if the table is not empty. | ||
*/ | ||
-- AlterTable | ||
ALTER TABLE "Comment" ADD COLUMN "articleId" TEXT NOT NULL; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "Comment" ADD CONSTRAINT "Comment_articleId_fkey" FOREIGN KEY ("articleId") REFERENCES "Article"("id") ON DELETE CASCADE ON UPDATE CASCADE; |
11 changes: 11 additions & 0 deletions
11
prisma/migrations/20241208004635_add_product_comment_relations/migration.sql
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* | ||
Warnings: | ||
- Added the required column `productId` to the `Comment` table without a default value. This is not possible if the table is not empty. | ||
*/ | ||
-- AlterTable | ||
ALTER TABLE "Comment" ADD COLUMN "productId" TEXT NOT NULL; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "Comment" ADD CONSTRAINT "Comment_productId_fkey" FOREIGN KEY ("productId") REFERENCES "Product"("id") ON DELETE CASCADE ON UPDATE CASCADE; |
3 changes: 3 additions & 0 deletions
3
...igrations/20241208010224_edit_product_comment_and_article_comment_relations/migration.sql
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
-- AlterTable | ||
ALTER TABLE "Comment" ALTER COLUMN "articleId" DROP NOT NULL, | ||
ALTER COLUMN "productId" DROP NOT NULL; |
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.