shareish / shareish

Main code of the Shareish platform (backend & frontend)

Home Page:https://shareish.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

feat: improving VueJS routes

banneux-florent opened this issue · comments

Somes routes could be using regex to improve user experience and prevent bad requests to be sent to the server. For example, we could verify that ids are positive intergers, that tokens match the token pattern, etc..

Routes that will still need to be done:

  • name: resetPasswordConfirm, path: /reset-password/confirm/:uid/:token (can't confirm 100% know uid and token pattern)
  • name: activateEmailToken, path: /activate/:uid/:token (can't confirm 100% know uid and token pattern)
  • name: addItemPos, path: /add-item/pos/:lat/:lng/:type/:resource/:rid (don't know last 3 possible value/pattern)

Thanks.

Here are more information about the last one:
name: addItemPos, path: /add-item/pos/:lat/:lng/:type/:resource/:rid (don't know last 3 possible value/pattern)

--> This is a route for adding a request or donation linked to a public resource (e.g. add a request to clean a solidarity fridge)

:type is an item type usually string RQ (request) or DN (donation)
:resource is a public resource type (string as defined in extraCategories in TheMapView)
:rid is an numerical identifier of a public resource, in the case of OSM it is the identifier of a node encoded as a 64-bit integer >=1

Thanks.

Here are more information about the last one: name: addItemPos, path: /add-item/pos/:lat/:lng/:type/:resource/:rid (don't know last 3 possible value/pattern)

--> This is a route for adding a request or donation linked to a public resource (e.g. add a request to clean a solidarity fridge)

:type is an item type usually string RQ (request) or DN (donation) :resource is a public resource type (string as defined in extraCategories in TheMapView) :rid is an numerical identifier of a public resource, in the case of OSM it is the identifier of a node encoded as a 64-bit integer >=1

Missing verifications have been added to this route and are now available in the open pull request.