이야기의 리액션 생성
Develop Env
Develop Env
POST
/apis/v1/posts/{postId}/reactions
Request
Path Params
postId
string
required
Example:
00000000-0000-0000-0000-200000000000
Body Params application/json
type
enum<string>
required
Allowed values:
GOODBADFIRESEEHEARTSMILESADANGRYWOWQUESTION
Example
{
"type": "GOOD"
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://localhost:9050/apis/v1/posts/00000000-0000-0000-0000-200000000000/reactions' \
--header 'Content-Type: application/json' \
--data-raw '{
"type": "GOOD"
}'
Responses
🟢201🟢 리액션 생성 성공
application/json
Body
toast
object (Toast)
required
title
string
required
description
string
required
payload
object (PostReaction)
required
id
string
required
createdAt
string
required
Default:
CURRENT_TIMESTAMP
updatedAt
string
required
deletedAt
string | null
optional
type
enum<string>
required
Allowed values:
GOODBADFIRESEEHEARTSMILESADANGRYWOWQUESTION
userId
string
required
postId
string
required
Example
{
"toast": {
"title": "게시글 리액션 생성",
"description": "게시글의 \"👍\" 리액션이 성공적으로 생성되었습니다."
},
"payload": {
"id": "5bcc1677-eb7f-4234-bc85-1842559938c8",
"createdAt": "2025-01-12T01:10:11.707Z",
"updatedAt": "2025-01-12T01:10:11.707Z",
"deletedAt": null,
"type": "GOOD",
"userId": "00000000-0000-0000-0000-000000000000",
"postId": "00000000-0000-0000-0000-200000000000"
}
}
🟠400🔴 유효성 검사 실패
🟠403🔴 권한없음
🟠404🔴 존재하지 않음
🟠409🔴 중복된 요청
Modified at 2025-01-14 08:57:28