Untitled

회원 상세 정보 조회 /api/info/{uid}?type=[type]&일자=

# type
- uid = 회원아이디
- type = exercise, diet
- CommentBoardType = D(Diet), E(Exercise)

# Request
- 예시
	HTTP Method: GET
	URL: https://[경로미정]/info/{uid}?type=[type]&일자=[date]
	Headers:
		Authorization: Bearer {token} //헤더에 엑세스 토큰 보내주세요 !
		Content-Type: application/json		

	{
		"diet": {
				"date": 데이트타입 형식 // 공통코드 확인
		}
	}

# Response
- diet_type : common_id = 공통코드 번호 (ex. 123 = 아침, 124 = 점심 ...)

	[
		{
			"DietId" : "101",
			"DietType" : "123 ",
			"DietDate": "2022-01-01T12:00:00Z",
			"DietUrl": "https://example.com/images/diet101.jpg",
			comments : [
				{
					"CommentId" : "10",
					"CommentContent" : "이식단 맞아요?",
					"CommentCreatedAt" : "2022-01-01T12:00:00Z",
					"CommentBoardId" : "101",
					"CommentBoardType" : "D",
					"CommentUserId" : "1"
				},
				{
					"CommentId" : "11",
					"CommentContent" : "이게 저의 최선이였습니다.",
					"CommentCreatedAt" : "2022-01-01T12:01:00Z",
					"CommentBoardId" : "101",
					"CommentBoardType" : "D",
					"CommentUserId" : "2"
				},
				{
					"CommentId" : "12",
					"CommentContent" : "오늘 운동 1시간 더하고 가세요",
					"CommentCreatedAt" : "2022-01-01T12:02:00Z",
					"CommentBoardId" : "101",
					"CommentBoardType" : "D",
					"CommentUserId" : "1"
				}
			]
		},
		{
			"DietId" : "102",
			"DietType" : "124",
			"DietDate": "2022-01-01T12:00:00Z",
			"DietUrl": "https://example.com/images/diet102.jpg",
			comments : [
				{
					"CommentId" : "13",
					"CommentContent" : "??? 왜 저녁도 식단이 이따구죠?",
					"CommentCreatedAt" : "2022-01-01T17:00:00Z",
					"CommentBoardId" : "102",
					"CommentBoardType" : "D",
					"CommentUserId" : "1"
				},
				{
					"CommentId" : "14",
					"CommentContent" : "이게 저의 최선이였습니다.",
					"CommentCreatedAt" : "2022-01-01T17:01:00Z",
					"CommentBoardId" : "102",
					"CommentBoardType" : "D",
					"CommentUserId" : "2"
				},
				{
					"CommentId" : "15",
					"CommentContent" : "오늘 운동 3시간 더하고 가세요",
					"CommentCreatedAt" : "2022-01-01T17:02:00Z",
					"CommentBoardId" : "102",
					"CommentBoardType" : "D",
					"CommentUserId" : "1"
				}
			]
		}
	]

Untitled

식단 등록 POST /diet

# Request
- diet_type : common_id = 공통코드 번호 (ex. 123 = 아침, 124 = 점심 ...)

	{
		"type" : "123",
		"date" : today.ISOString(),
		"imgUrl" : "dd"
	}

# Response
- 등록한 식단의 등록id 반환

	{
		"dietId" : "101"
	}

식단 댓글 등록 POST /diet/comment

- CommentBoardId = 식단아이디
	CommentBoardType = D(Diet), E(Exercise)
	DietType : common_id = 공통코드 번호 (ex. 123 = 아침, 124 = 점심 ...)

# Request 
- 헤더에 엑세스 토큰 보내주세요 ! 

	{
		"content" : "이식단 맞아요?",
		"createdAt" : 데이트타입 형식 // 공통코드 확인,
		"boardId" : "101",
		"boardType" : "D",
	}

# Response
- 해당 식단에 대한 전체댓글 리스트 갱신해서 돌려줌

	[
		{
			"CommentId" : "10",
			"CommentContent" : "이식단 맞아요?",
			"CommentCreatedAt" : "2022-01-01T12:00:00Z",
			"CommentBoardId" : "101",
			"CommentBoardType" : "D",
			"CommentUserId" : "1"
		},
		{
			"CommentId" : "11",
			"CommentContent" : "이게 저의 최선이였습니다.",
			"CommentCreatedAt" : "2022-01-01T12:01:00Z",
			"CommentBoardId" : "101",
			"CommentBoardType" : "D",
			"CommentUserId" : "2"
		},
		{
			"CommentId" : "12",
			"CommentContent" : "오늘 운동 1시간 더하고 가세요",
			"CommentCreatedAt" : "2022-01-01T12:02:00Z",
			"CommentBoardId" : "101",
			"CommentBoardType" : "D",
			"CommentUserId" : "1"
		}
	]

식단 수정 PATCH /api/diet

DietType : common_id = 공통코드 번호 (ex. 123 = 아침, 124 = 점심 ...)

# Request 
- 헤더에 엑세스 토큰 보내주세요 ! 
	
	{
		"DietId" : "101",
		"DietType" : "123 ",
		"DietDate": 데이트타입 형식 // 공통코드 확인,
		"DietUrl": "https://example.com/images/diet101.jpg"
	}

# Response

	{
		"DietId" : "101",
		"DietType" : "123 ",
		"DietDate": "2022-01-01T12:00:00Z",
		"DietUrl": "https://example.com/images/diet101.jpg"
	}

식단 삭제 DELETE /api/diet/{식단아이디}

# Request 
- 헤더에 엑세스 토큰 보내주세요 ! 

# Response
HTTP Status Code: 200 OK