✔글 내용 검색 - SangleProject/Sangle GitHub Wiki

메소드 경로 설명
GET /main/searchPost?post=#{post} 글감 검색

search_user 글감 -  검색

Request Header

{
    "Content-Type": "application/json",
    "token" : "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJTQU5HTEUiLCJ1c2VySWR4IjoyLCJleHAiOjE2MDQxMjgyMzJ9.ZIyE8yKyMZyxdE1QBMPYGlllPvWjVyWNosX-r4H7iDo"
}

Request Params

{
    "post": ""
}

Response

< Success >

  1. 데이터 있을 때
[
    {
        "postIdx": 23,
        "profileImg": "https://outsopt26.s3.ap-northeast-2.amazonaws.com/profile7.png",
        "nickName": "ha",
        "topic": "오빠",
        "postWrite": "오빠는",
        "date": "2020.10.25",
        "time": "PM 07:29",
        "day": "",
        "liked": true,
        "likes": 23,
        "isBan": false
    },
    {
        "postIdx": 15,
        "profileImg": "https://outsopt26.s3.ap-northeast-2.amazonaws.com/profile4.png",
        "nickName": "a",
        "topic": "과거",
        "postWrite": "과거는",
        "date": "2020.10.24",
        "time": "PM 08:34",
        "day": "",
        "liked": false,
        "likes": 100,
        "isBan": false
    }
]
  • postIdx : 게시글 인덱스
  • nickName : 사용자 닉네임
  • profileImg : 사용자 프로필 이미지
  • topic : 글감
  • postWrite : 글 내용
  • date : 작성날짜
  • time : 작성시간
  • day : 작성요일
  • liked : 이미 좋아요 눌렀으면 true, 안 눌렀으면 false
  • likes : 좋아요 개수
  • isBan: 신고당함 숨김여부


  1. 데이터가 없을 때

< Fail >

  • 토큰값이 없을 때 (400)
{
    "data": null
}
  • 권한 에러 (401)
{
    "data": null
}
  • 데이터베이스 에러 (600)
{
    "data": null
}
  • 서버 내부 에러 (500)
{
    "data": null
}
  • 메소드 에러 (405)
  • 경로 에러 (404 or 400)

⚠️ **GitHub.com Fallback** ⚠️