brentvollebregt/whos-on-my-network

Urls do not resolve correctly.

m10653 opened this issue · 5 comments

So when using the web interface I noticed that everything worked fine when using the gui to navigate but as soon as you refreshed the page or sent the link of the page it would return a 404.

IE clicking scans brings you to /scans but if you refresh or navigate to /scans your get a 404.

@m10653, could you checkout the latest on master and let me know if my latest changes have fixed the issue?

If so, I will create a new release.

Will do. We just had a power outage so ill get back to you in a little bit.

@brentvollebregt So testing most things work, but the following api endpoints fail.

/scans/#id
/devices/#id
/people/#id
all return a internal server error.

[2021-08-15 12:01:16,279] ERROR in app: Exception on /people/4 [GET]
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 2070, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1515, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1513, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1499, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
TypeError: root() got an unexpected keyword argument 'id'

I tested the following urls and they work correctly:
/scans
/devices
/people
/current

Also I have written a plugin for support for Fios-G1100 router. Would you like me to make a PR for it?

@m10653, I've just pushed a change to master to fix this.

Also, plugins are welcome! Feel free to create a PR and I can review it.

Sweet. Will do. Also your last commit seemed to fix the issue! Thanks.