Closed pacokwon closed 3 years ago
추가사항:
Agenda
participants
GET /api/agendas
pplWhoDidNotVote
결론적으로 /api/agendas 의 응답은 다음과 같이 생겼습니다.
/api/agendas
[ { _id: '6107ea51ee385f7b67e7a3e8', choices: [ '찬성', '반대' ], status: 'progress', participants: [ 'pacopaco', 'testebea0f' ], title: 'asdf', content: 'qwer', subtitle: 'bs', votesCountMap: { '찬성': 0, '반대': 1 }, createDate: 2021-08-02T12:51:29.407Z, expires: 2021-08-02T12:51:38.434Z, __v: 0, pplWhoDidNotVote: [ 'pacopaco' ], userChoice: null }, { _id: '6107e253b0b5a36bacf94ad4', choices: [ '찬성', '반대' ], status: 'progress', participants: [ 'pacopaco' ], title: 'foo', content: 'bar', subtitle: 'baz', votesCountMap: { '찬성': 1, '반대': 1 }, createDate: 2021-08-02T12:17:23.044Z, expires: 2021-08-02T12:22:08.455Z, __v: 0, pplWhoDidNotVote: [], userChoice: '반대' }, { _id: '6107e35cb0b5a36bacf94ad7', choices: [ '찬성', '반대' ], status: 'progress', participants: [ 'pacopaco', 'testebea0f' ], title: 'bar', content: 'baz', subtitle: 'fo', votesCountMap: { '찬성': 1, '반대': 0 }, createDate: 2021-08-02T12:21:48.949Z, expires: 2021-08-02T12:22:07.893Z, __v: 0, pplWhoDidNotVote: [ 'testebea0f' ], userChoice: '찬성' } ]
추가사항:
Agenda
(안건) 모델에participants
필드 추가 - 해당 안건을 생성할 시 접속해 있던 사람들의 uid 배열로 구성해놓음GET /api/agendas
에서pplWhoDidNotVote
)participants
)결론적으로
/api/agendas
의 응답은 다음과 같이 생겼습니다.