Skip to content
This repository was archived by the owner on Mar 1, 2026. It is now read-only.
This repository was archived by the owner on Mar 1, 2026. It is now read-only.

Access user-facing data via non-admin routes on API #222

Closed

Description

@peterkos

Architectural goal of this update is to decouple users and questionnaires.

Note that first/last names are being moved to the user model too. This way admins do not need to have questionnaires, and can still be considered a full "user".

Implementation notes for self:

  • Email fallback for full name when no questionnaire present is no longer needed
  • Moved first_name and last_name columns from questionnaire to user
  • Moved full_name method (?) to user

Activity

  1. self-assigned this
    on May 23, 2020
  2. dquach217 commented on May 23, 2020

    @dquach217
    Contributor

    @peterkos do you have er diagram of the changes?

  3. sman591 commented on May 23, 2020

    @sman591
    Member

    Note the user<>questionnaire relationship is already set up (for example, questionnaire.email pulls directly from the user) so it doesn't seem like a new relationship has to be defined here. If you do need to create one I'd take a look at https://guides.rubyonrails.org/association_basics.html

  4. peterkos commented on May 23, 2020

    @peterkos
    ContributorAuthor

    @dquach217 Not yet; I'm still planning the changes out. Do you mean any changes in the models/tables?
    @sman591 Thanks! That should definitely make things easier. I think this change is mostly around exposing the user data itself to the API and treating that as the default rather than "less than" a questionnaire -- both in other controllers and in the model. So while the relationship might not change, its usage throughout the backend will.

  5. added this to the 2.0 milestone on May 24, 2020
  6. added a commit that references this issue on Jun 28, 2020
  7. peterkos commented on Aug 30, 2020

    @peterkos
    ContributorAuthor

    Firstname/lastname refactor took literal months.
    Plan is to test that refactor on staging before making API changes that will finally close out this issue

  8. linked a pull request that will close this issueCreate /user.json get route + test #367on Sep 21, 2020
  9. added a commit that references this issue on Sep 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions