Skip to content
This repository has been archived by the owner on Dec 3, 2019. It is now read-only.

Modify User Flow routes: step 1 #471

Closed
apex-omontgomery opened this issue Mar 13, 2019 · 3 comments · May be fixed by #473
Closed

Modify User Flow routes: step 1 #471

apex-omontgomery opened this issue Mar 13, 2019 · 3 comments · May be fixed by #473
Assignees
Labels
Backend Repair Overhaul of Rails

Comments

@apex-omontgomery
Copy link
Member

apex-omontgomery commented Mar 13, 2019

Feature

Why is this feature being added?

The frontend redesign requires a slightly changed api for user connections.

What should your feature do?

Separate the various sidekiq jobs into individual invocations that don't cause the other to fail

Add some logging for the steps

Create endpoint to verify that email is unique

  1. HTTP: HEAD
  2. Params: None
  3. route: /api/v1/users/email/{email}
  4. returns: 200 on success; 404 on error
  5. unit test for route

Create get user details endpoint - GET verified route only

  1. HTTP: GET
  2. Params: {email, auth token}
  3. route: /api/v1/users/me
  4. returns: 200 on success; 404 on error. Contains items below:
  5. Unit test for route

Allow more params in PATCH

  1. Update tests to show this is true
  2. Update unit tests to accomodate all parameters

Update apiary to include above changes

Current allowed All fields Derived/ clarification POST/PATCH /Me return
:email t.string "email" X X
:zip, t.string "zip" X X
t.float "latitude" derived X
t.float "longitude" derived X
t.datetime "created_at", null: false derived
t.datetime "updated_at", null: false derived
:password, -> converted to encryptee t.string "encrypted_password", default: "", null: false derived X
t.string "reset_password_token" derived
t.datetime "reset_password_sent_at" derived
t.datetime "remember_created_at" derived
t.integer "sign_in_count", default: 0, null: false derived
t.datetime "current_sign_in_at" derived X
t.datetime "last_sign_in_at" derived
t.inet "current_sign_in_ip" derived
t.inet "last_sign_in_ip" derived
:mentor, t.boolean "mentor", default: false "do you want to be a mentor" X X
:first_name, t.string "first_name" X X
:last_name, t.string "last_name" X X
t.string "timezone" X
:bio, t.text "bio" X X
:verified, -> id.me callback t.boolean "verified", default: false, null: false derived- innactive X X
:state, t.string "state" X X
:address1, t.string "address_1" X X
:address2, t.string "address_2" X X
t.string "city" ADD X
:username, t.string "username" X X
:volunteer, t.boolean "volunteer", default: false "do you want to volunteeer" X X
:branch_of_service, t.string "branch_of_service" X X
:years_of_service, t.float "years_of_service" X X
:pay_grade, t.string "pay_grade" X X
:military_occupational_specialty, t.string "military_occupational_specialty" X X
:github, t.string "github" X X
:twitter, t.string "twitter" X X
:linked_in, t.string "linkedin" X X
:employment_status, t.string "employment_status" X X
:education, t.string "education" X X
:company_role, t.string "company_role" X X
:company_name, t.string "company_name" X X
:education_level, t.string "education_level" X X
interests: [] t.string "interests" X X
:scholarship_info, t.boolean "scholarship_info", default: false "do I want scholarship info" X X
:role_id, t.integer "role_id" old admin note X X
:military_status, t.string "military_status" validated in [ 'current', 'veteran', 'spouse'] X X
@cassianoblonski
Copy link

hey @wimo7083 can I try this?

@apex-omontgomery
Copy link
Member Author

Hi, I currently have something in progress:
#473

I currently have the check for if the email is taken working, and tests passing.

If you want to fix my attempts at /api/v1/users/me and get the tests working you can give it a shot.

@apex-omontgomery apex-omontgomery added the Backend Repair Overhaul of Rails label Apr 6, 2019
@apex-omontgomery
Copy link
Member Author

No longer needed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Backend Repair Overhaul of Rails
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants