Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[스탬프투어2.0]통합게시판 연동 좋아요 API작성 #51

Open
3 tasks done
kishe89 opened this issue Sep 4, 2017 · 3 comments
Open
3 tasks done

[스탬프투어2.0]통합게시판 연동 좋아요 API작성 #51

kishe89 opened this issue Sep 4, 2017 · 3 comments

Comments

@kishe89
Copy link

kishe89 commented Sep 4, 2017

  • 좋아요 데이터 추가
  • 좋아요 up update
  • 좋아요 down update
@kishe89
Copy link
Author

kishe89 commented Sep 6, 2017

좋아요 모델 post모델에 임베디드시킴 likes = 좋아요 카운트, likedPersons는 좋아요 누른사람들의 리스트

var PostSchema = new Schema({
	title: String,
	contents: String,
	townName: String,
	views:{type:Number, default: 0},
	postedBy: {
		Nick: String,
		applicationId: String
	},
	comments: [{
		contents: String,
		Created: { type:Date, default:Date.now },
		Updated: { type:Date, default:Date.now },
		postedBy: {
			Nick: String,
			applicationId: String
		}
	}],
	likes:{ type:Number, min: 0, default: 0},
	likedPersons:[{
		Nick: String,
		applicationId: String,
		Updated:{type:Date, default:Date.now}
	}],
	files: [{
		Uploaded: { type:Date, default:Date.now },
		name: String,
		size: Number,
		container: String
	}],
	ApplicationId: String,
	Created: { type:Date, default:Date.now },
	Updated: { type:Date, default:Date.now }
});

@kishe89
Copy link
Author

kishe89 commented Sep 6, 2017

@inbum 현재 post 페이징 조회 API 수정중에 있습니다.
/v2/posts/like/:post_id (좋아요 API) method put
/v2/posts/like/:post_id/:like_id (좋아요 취소API) method delete
오늘 새벽 테스트 진행해보고 문서 업데이트 하도록 하겠습니다.

@kishe89 kishe89 added the test label Sep 6, 2017
@kishe89
Copy link
Author

kishe89 commented Sep 7, 2017

문서

@jellanbin @inbum @lch8609 version2 태그 누르시면 해당 API들 정리되어있습니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant