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

Implement basic participant controller functionality #59

Open
10 tasks
bunsenmcdubbs opened this issue Feb 23, 2018 · 0 comments
Open
10 tasks

Implement basic participant controller functionality #59

bunsenmcdubbs opened this issue Feb 23, 2018 · 0 comments

Comments

@bunsenmcdubbs
Copy link
Contributor

bunsenmcdubbs commented Feb 23, 2018

  • Creating a new table for participant "flags"
    • via database migration
  • Add new function(s) in model/participant/participant.go for:
    • setting flag(s)
      • Add unit test
    • getting flagged participants
      • Add unit test
    • getting all participants
      • Add unit test
  • Adding a participant controller with routes for all of the above^ (remember to properly catch and return errors)

Relevant routes from #58 (to be finalized):

Route Method Description Request Response
/participant GET Get all participants - {participants: []<participant>}
/participant/flag PUT Flag participants for the current user {participant_ids: []<id>} {status: "ok"}
/participant/flag DELETE Unflag participants for the current user {participant_ids: []<id>} {status: "ok"}
/participant/flagged GET Get all flagged participants for the current user - {participants: []<participant>}
/participant/{id}/flag POST Flag participant for the current user None {status: "ok"}
/participant/{id}/flag DELETE Unflag participant for the current user None {status: "ok"}

Paths/interface will be finalized in #58

If #57 (user authentication middleware) is not yet complete, this can be initially implemented with a static user and wait until that feature is merged.

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