ohait / rfid-scanner

RFID scanner for libraries

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

svelte-router issues

ohait opened this issue · comments

I was fixing the hardcoded item_supplier code by allowing url like: /#/item/NO:12345/03010123456789
and i modified the router like '/item/:item_supplier/:item_id'

but i noticed it doesn't matter much what is written after the column, the value will be assigned to path.item instead of path.item_supplier or item_id

It might be a bug, but i couldn't understand how the router works, so i ended up using a column and splitting over it in page/Item.html which is suboptimal.

maybe the whole router should be reviewed by someone that knows better than me? . o ( @bensinober )

I actually found out why it was not working for me, the RegEx was not allowing the underscore, truncating :item_supplier and :item_id to :item and causing lots of confusion. working now