Code Monkey home page Code Monkey logo

Comments (6)

agneym avatar agneym commented on July 1, 2024

Ref: #7 (comment)

from journal.

unnitallman avatar unnitallman commented on July 1, 2024

API endpoint: https://github.com/coronasafe/journal/blob/develop/doc/api.md#routemap-for-a-user

from journal.

agneym avatar agneym commented on July 1, 2024

@unnitallman We need to consolidate the two APIs required here. The current API flow dictates two steps:

  1. search for user using phone number and date of birth
  2. use the returned user ID to fetch routes.

But since phone number is unique in the first place, the search makes no sense, also with a user id that can be guessed, it's opening up the second API to search all users.
Instead we need to have a single API that can look up the user by phone number and date of birth, return user details (the name just for confirmation that admin has the right user) and route map.

from journal.

unnitallman avatar unnitallman commented on July 1, 2024

@agneym The user table uses integer ids. That is not a good thing and thats what makes it "guessable". I will change it to uuid. If so do you think, we will still need to merge the two APIs ? its not difficult to do, just let me know.

from journal.

unnitallman avatar unnitallman commented on July 1, 2024

#65 converts ID of user table from integer to UUID. Haven't merged it yet. Once this is done, existing database will need to reset using ./bin/setup since user -> visit relationships will be affected by this change.

from journal.

agneym avatar agneym commented on July 1, 2024

That sounds fine for now, we can review the UI later if necessary

from journal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.